How to convert the src of an audio file into a blob object?

for example, an audio tag with a src inside does not want to be exposed, so it needs to be converted into a blob object, how to do it?

there will be errors when I read the methods on the Internet before, and most of them are pictures.

Jun.24,2022

https://stackoverflow.com/que...
focuses on responseType


ah ~ omnipotent jquery

function url2Blob(url) {
  return new Promise(resolve => {
    $.ajax({
      url,
      cache: false,
      xhr: () => {
        // Seems like the only way to get access to the xhr object
        var xhr = new XMLHttpRequest();
        xhr.responseType = 'blob';
        return xhr;
      },
      success: data => {
        resolve(data);
      }
    });
  });
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bedddb-31bcb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bedddb-31bcb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?