Videos are all played with sound at once...
I have a website I built with ruby on rails with a bunch of posts where people can post images and videos. The videos are coded with :controls => true, :loop => true, :autoplay => true, muted: true, so they are playing as soon as the website is loaded on mute. The problem I have now is that when using firefox, ALL of the videos get played WITHOUT MUTE TOGETHER when the user goes to any other page. So whenever the user for example goes to the "about" page, the videos of the homepage are still playing on a loop with 100% volume and there is no way to stop it except for closing the website. This isnt really supporting for my user experience if you know what I mean.
What may also be worth mentioning is that I have a script which makes videos only play when on the user actually scrolled to their position.^
If you are interested in tinitus, you can try it out and listen to a concert of earrape videos (im not responsible for any braindamage). https://www.darkerr.co/posts This issue is not happening for Chrome, Safari or Edge. It must be something exclusively for firefox. Does anybody know how to fox this problem? Thank you so much!
All Replies (3)
I think the next page navigation must not be unloading the initial page so those DOM elements are still active somehow. However, I tried to reload the page and got a 500 error so... cannot explore further right now.
Okay so you just gave me an idea, I checked it out and I was able to solve it! Hurray!!! So for anybody interested or looking for the solution, I use a rails gem called turbolink, which increases loading speed between the pages, and which also seems to have the bug in firefox in which it unmutes all videos... A good solution is here https://stackoverflow.com/questions/50881424/turbolinks-and-autoplay-html5-video
@jscher2000 could you tell me again what happened and what you did when you got the 500 error? I fixed a few bugs today so maybe I fixed it now, but if its still there I would love to hear what went wrong for you ;) Thank you so much! Vincent
Hi Vincent, I'm glad to hear you found it.
Regarding the error, I was just reloading the page at the link you gave earlier and got a 500 error from the server. Maybe my cookies got crossed up?