Reputation: 269
Hello I have a page where the code was working perfectly that would launch a video when an an element with ".onclick" is assigned. Howvever it only seems to work in Chrome. There was even an instance when one page's video would work (in all browsers) but now neither of them work.
This works perfectly fine in Chrome though. I'm figuring I've messed up somewhere in my code and since FF is the most strict of browser's is the reason it won't play (oddly in IE as well). Any help would be appreciated. Thanks.
Upvotes: 0
Views: 343
Reputation: 163
Care to share your code because I cannot seem to get it to work in FF. Works great in other browsers though.
Here is the code I am using.
JS
var video = document.getElementById('video');
video.addEventListener('click',function(){
video.play();
},false);
HTML
<video src="your_video" width="250" height="50" poster="your_image" onclick="this.play();"/></video>
Upvotes: 2
Reputation: 269
Actually I found the issue. Firefox makes you put a "#" inside the A href tag for this situation.
Thanks for anyone who actually looked into it for me.
Upvotes: 0