Cross-origin restriction circumvention?
We can't directly analyze audio from video elements whose source is cross-origin, although they can be played back just fine. And this applies to many websites (Zoom call recordings, Invidious, Google Drive videos, many others).
Currently what we're doing is suggest opening the source directly in a new tab:

But would be cool if it just worked somehow. Preferably without violating what's cross-origin restriction is made for -
Somewhat of an option is to contact the website owners and ask them to apply the required cross-origin headers to the source (I think it's Access-Control-Allow-Origin?) but you can't contact them all.
More info:
- The responsible Web Audio API part of the spec: https://webaudio.github.io/web-audio-api/#MediaElementAudioSourceOptions-security
- An issue related to this, with some suggested solutions: https://github.com/WebAudio/web-audio-api/issues/2453
-
HTMLMediaElement's spec, search for "cross": https://html.spec.whatwg.org/multipage/media.html#security-and-privacy-considerations - Same issue in a similar extension: https://github.com/vantezzen/skip-silence/issues/71
Advice or thoughts are appreciated (as always).
wait how did u detect the likelihood of media being unsupported?
@LoneCoder21
It's this check
https://github.com/WofWca/jumpcutter/blob/81b4e507b68d9f7c50e90161326edc65038ae28c/src/entry-points/content/helpers/isSourceCrossOrigin.ts#L37
See the comment:
https://github.com/WofWca/jumpcutter/blob/c63821f8f61c41f66f790018f795db49778b0c14/src/entry-points/content/AllMediaElementsController.ts#L96-L115
So it's not like we detect an actual likelihood expressed as a number between 0 and 100%, but rather "it's cross-origin, so it's probably not gonna work".
Oh i see. I had this issue in my extension too so I'll just use this option 😞