Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Playing HTML5 video with JavaScript does not hide overlay obscuring video

  • 6 antwoorden
  • 4 hebben dit probleem
  • 1 weergave
  • Laatste antwoord van devbasu

more options

I Googled this problem and found nothing useful, and also checked the support area here and still nothing. I am creating a web page with HTML5 video. I made a layer with the video object that is hidden with CSS until the user clicks a link. When the user clicks the link, I use a JavaScript function to show and play the HTML5 video object. Works fine except that Firefox keeps the play button overlay in place while my video is playing! If I click on the overlay, the video pauses. Then if I click on it again, the overlay disappears and the video resumes playing.

I realize there are workarounds that can be hacked. But it's definitely a bug that the overlay stays in place after the video has started via a JavaScript command. I hope this problem finds its way to the right people at Mozilla for resolution.

Thanks, - DK

I Googled this problem and found nothing useful, and also checked the support area here and still nothing. I am creating a web page with HTML5 video. I made a layer with the video object that is hidden with CSS until the user clicks a link. When the user clicks the link, I use a JavaScript function to show and play the HTML5 video object. Works fine except that Firefox keeps the play button overlay in place while my video is playing! If I click on the overlay, the video pauses. Then if I click on it again, the overlay disappears and the video resumes playing. I realize there are workarounds that can be hacked. But it's definitely a bug that the overlay stays in place after the video has started via a JavaScript command. I hope this problem finds its way to the right people at Mozilla for resolution. Thanks, - DK

Gekozen oplossing

Can you please update to Firefox 18.0.1 and see if the problem exists there in a new profile? (13 is no longer supported)

Profile Manager - Create, remove or switch Firefox profiles

If it does still happen please give an example website with the issue and screenshots of what should be happening vs. what is happening

Dit antwoord in context lezen 👍 2

Alle antwoorden (6)

more options

Gekozen oplossing

Can you please update to Firefox 18.0.1 and see if the problem exists there in a new profile? (13 is no longer supported)

Profile Manager - Create, remove or switch Firefox profiles

If it does still happen please give an example website with the issue and screenshots of what should be happening vs. what is happening

more options

Yeah, upgrading to v. 18 fixed the problem. Now the question, any metrics on how many Firefox users are using v. 18 compared to older versions? Might have to leave my hack in place if too many....

Thanks, - DK

more options

Over 60% of users are on Firefox 18. You can encourage your website visitors to update to a modern browser version to help avoid this.

more options

I am facing the same problem. I am using Firefox 19.0.2.

Here is the test page:


If any of the videos is played from list, the overlay button does not disappear.

What is the solution or hack?

Bewerkt door devbasu op

more options

This issue had me foxed with Firefox 19.0.2 for a while, but I found a solution by trail and error:

document.getElementById('video').play(); document.getElementById('video').focus();

The first line starts the player (obviously), the second removes the overlay :)

more options

^ Your solution works like a charm!

You made my day ron_sinclair. I tried various methods for days without any results whatsoever and then gave up. The focus() thing is not clearly documented I suppose. Not for video at least.

Thanks a bunch.