javascript events - HTML5 Detect Entering Fullscreen -


i cannot seem figure out how bring element fullscreen mode upon video entering fullscreen mode. tried looking through various materials available still answer eludes me. have far:

 document.getelementbyid("videoid").addeventlistener("mozfullscreenchange", function () {  document.getelementbyid("imageid").mozrequestfullscreen();   }, false); 

the code firefox assume other browsers have similar behavior prefix have switched "moz" "webkit".

thank help.

as said in comments, there can't 2 fullscreen elements @ once. code should work:

document.getelementbyid("videoid").addeventlistener("mozfullscreenchange", function () {  if(document.mozfullscreen){   document.mozcancelfullscreen();   document.getelementbyid("imageid").mozrequestfullscreen();  } }, false); 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -