Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Learn More

How can Background Video without sound be played automatically?

more options

Dear Mozilla Community,

i have the Problem describted in the Headline. The Problem startet with the Firefox-Version 65 that autoplay of a video file is disabled.

To be seen under: https://www.ancud.de

Thank you very much in advance,

Daud

Dear Mozilla Community, i have the Problem describted in the Headline. The Problem startet with the Firefox-Version 65 that autoplay of a video file is disabled. To be seen under: https://www.ancud.de Thank you very much in advance, Daud

Izbrana rešitev

I noticed something different between Firefox and Chrome.

In Chrome, the video tag has these additional attributes that are not present on the video tag in Firefox:

muted playsinline autoplay

Hmm, let's see if we can fool the script.

Experiment: I went into about:config and created this new string preference:

Name: general.useragent.override.ancud.de

Value: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36

Then when I reloaded the page, the video tag got those attributes and Firefox played the video.

Conclusion: The script in the page needs to be updated to add those attributes in Firefox, too.

Preberite ta odgovor v kontekstu 👍 1

Vsi odgovori (13)

more options

Hello zooyork911,

Would you please take a look at this article :

https://support.mozilla.org/en-US/kb/block-autoplay

'Hope that helps .....

more options

Did you look at this pref on the about:config page?

  • media.autoplay.allow-muted

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

more options

Isn't that the point? If the user has kept the default setting of autoplay disabled, why would they want a site to be able to play video automatically?

more options

Izbrana rešitev

I noticed something different between Firefox and Chrome.

In Chrome, the video tag has these additional attributes that are not present on the video tag in Firefox:

muted playsinline autoplay

Hmm, let's see if we can fool the script.

Experiment: I went into about:config and created this new string preference:

Name: general.useragent.override.ancud.de

Value: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36

Then when I reloaded the page, the video tag got those attributes and Firefox played the video.

Conclusion: The script in the page needs to be updated to add those attributes in Firefox, too.

more options

It seems to be something in the Revolution slider but it's minified so I can't figure out what it's doing. The recent updates listed on https://www.themepunch.com/revslider-doc/changelog/ do not mention this issue, so updating might not resolve it. It might be a bug that needs squashing in a future version.

more options

Hey jscher2000,

Thank you very much with your answer and all others too! Changing the User-Agent worked fine. I just can't find in Chrome the additional video-tags you were mentioning. Can you provide me a step by step guide on how i can see these attributes?

Thank you so much in advance, zooyork911

more options

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

You can create a new String pref via the right-click context menu on the web page area..

Name: general.useragent.override.ancud.de
Value: Firefox/\d{2}#Chrome/73.0.3683.86

This only changes Firefox in your current user agent to Chrome only on the ancud.de domain. This worked for me when I tried it and the Inspector showed the extra attributes.

more options

You can right-click the player area and use and select "Inspect Element" to open the builtin Inspector with this element selected.

more options

@cor-el

Thank you very much for your help. I'm familiar with the Page-Inspector i just can't find the "tags" you are talking about. Could you please provide me with the whole "video tag" or the XPath to it? Thank you very much in advance, zooyork911 / Daud

more options

Try using the little search box in the Inspector to find the video tag if the right-click > Inspect Element isn't precise enough (that may select a controls layer instead of the video tag).

more options

Thank you very much now i found the video-tag (o.O)

more options

Now i have still a Problem. I added with jQuery after the Ajax-Call the necessary Attributes like this: var resz = $( document ).find('.resizelistener'); resz.attr('muted','true'); resz.attr('playsinline','true'); resz.attr('autoplay','autoplay');

Now it looks in the Inspector (from FireFox) identically like on Chrome BUT the Video is not starting. When i edit the Node inside the Inspector > Edit as HTML and then leave the Edit-Mode - the Video plays. Even though i didn't change the attributes manually.

Have you guys any idea what happens inside the Inspector + Edit as HTML - "saving"?

Thanks very much in advance, zooyork911

Spremenil zooyork911

more options

It's possible your script runs too late, meaning, adding the autoplay attribute to an existing tag may not cause Firefox to autoplay. As long as you are running a script, why not call the .Play() method on the tag?

Regarding Edit as HTML in the developer tools, it may be considered as inserting a completely new tag, so that may get evaluated for autoplay. I'm not sure exactly what happens there.