code: function getFileExtension(url) {
      if (typeof url !== 'string') {
          return '';
      }
      // from DataURL
      if (url.slice(0, 5) === 'data:') {
          const match = url.match(/data:audio\/(ogg|mp3|opus|wav|m4a)/i);
          if (match && match.length > 1) {
              return match[1].toLowerCase();
          }
      }
      // from Standard URL
      url = url.split('?')[0];
      url = url.slice(url.lastIndexOf('/') + 1);
  
      const a = url.split('.');
      if (a.length === 1 || (a[0] === '' && a.length === 2)) {
          return '';
      }
      return a.pop().toLowerCase();
  }
docs: /*
  find a supported file