Andrews54757 / FastStream

Stream videos without buffering in the browser. An extension that gives you a better, accessible video player designed for your needs.
https://faststream.online/
Other
443 stars 30 forks source link

[BUG] Direct Video Playing Without Sound #145

Closed Sarmadkh closed 5 months ago

Sarmadkh commented 5 months ago

Describe the bug Direct Video Playing without sound.

Here is the console log.

MediaElementAudioSource outputs zeroes due to CORS access restrictions for https://sample-videos.com/video321/mp4/480/big_buck_bunny_480p_10mb.mp4

Version Online 1.3.7

Platform I am using the online version on Chrome https://faststream.online/player/#

Steps to Reproduce Some videos fail to load on Accelerated, however when i play them on Direct, the video starts playing but without any sound whatsoever. I have tested many videos that wont play on Accelerated. Sample Video

Possible Solution SO suggested this, but i don't know where to add this. audio.crossOrigin = "anonymous";

Andrews54757 commented 5 months ago

The server hosting the video has not set the right "Access-Control-Allow-Origin" headers to allow you to play the video from other websites. Setting crossOrigin to anonymous did not fix the issue, in fact, it causes the video to error completely (you can try it on the website, I've added it there). There is nothing I can do to force Chrome to acknowledge the video when the site doesn't have CORS configured. (accelerated mode also fails because of the same reason).

Instead, try using the extension. The extension is able to override CORS to a certain extent and modify headers. I was able to play the provided video using the extension with no problems.