0

I want to wrap the HTML5 video with link tag:

<a href="yourpage.html">
  <video width="560" height="315" autoplay muted controls loop>
       <source src="http://video.webmfiles.org/big-buck-bunny_trailer.webm" type="video/webm">
   </video>
</a>

It works perfectly on Chrome and Opera - I can click on the controls, eg, pause, play, volume, etc. And I also can click on the link that I want to go to another page when you click on it.

But it does not work on Firefox at all - I can't only click on the controls. It triggers the link too when I click anything on the controls! I want it to work the same way as Chrome/ Opera.

Any ideas how I can fix this on Firefox?

Heretic Monkey
  • 11,687
  • 7
  • 53
  • 122
Run
  • 54,938
  • 169
  • 450
  • 748
  • 1
    Seems like Firefox is doing what it's supposed to. By putting an element within an anchor, clicking anywhere on that element should trigger the anchor's default behavior (navigating to the `href`). – Heretic Monkey Feb 28 '17 at 16:05
  • IE used to be the pain in the a** for us. Now finally Firefox is catching up! – Run Feb 28 '17 at 16:10

2 Answers2

1

May the Solution is being in updating Firefox? I dont know which version u are using, but the TAG <video> is new in html5 (may you alread know that) and not all version of browsers accept them. Else i would say it is a bug in Firefox itselfs, not a mistake in your code.

On W3Schools there is a list wich version you need: klick me

Added VideoJS link

Otherways use VideoJS, an openSource video player

Kevin Liss
  • 136
  • 1
  • 3
  • 15
0

Why you dont use an iframe:

 <a href="yourpage.html">
   <iframe src="http://video.webmfiles.org/big-buck-bunny_trailer.webm"></iframe> 
 </a>

I think that is better for Firefox and for anothers too.

B.Denis
  • 23
  • 8