Jeffrey James Jeffrey James - 1 year ago 76
jQuery Question

How to fix a function that's interfering with Firefox's Default HTML5 Video Player

Why is


interfering with Firefox's HTML5 default video controls and how to fix it?

I have this problem where I gave my poster an onclick play this function and it works on browsers except for firefox. Firefox's default HTML5 video control is now not working. If you press play it does nothing but refresh the area and the play button reappears but the video never plays. But if you skip the video to certain parts it will 'eventually' load and play it.

Here's the code:

<video id="bigvid3" poster="
5718060450832183858" onclick=";" preload="none" controls="controls" width="100%">
<source src="//" type="video/mp4">

Answer Source

You have to disable firefox's default controls.

document.getElementById('myVideo').addEventListener('click', function (event) {
    event.preventDefault(); // Prevent the default behaviour in FireFox

    // Then toggle the video ourselves
    if (this.paused) {;
    else {

Replace myVideo with your video ID in this case "bigvid3". You will get the functionality you're looking for.

If you want to learn more refer to this link as it too answers this question.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download