javascript - Allow fullscreen in innerhtml/iframe -


i trying allow user able view video in fullscreen mode. video embed in streamvideo.php inside stream.php using iframe.

i found iframe not allow content fullscreen unless called allowfullscreen

when user login site. index.php using inner html load stream.php , various iframe load inside stream.php

index.php

  <li id="onlineslides"><a href="#onlineslides" onclick="load_home2();">onlineslides</a></li>          function load_home2(){                     document.getelementbyid("content").innerhtml='<object style="width: 100%; height: 100%; overflow:auto" type="text/html" data="stream/stream.php" ></object>';                 } 

stream.php

<iframe src="video/streamvideo.php" id="streamvideoiframe" frameborder="0" width="800" height="1000" allowfullscreen="" webkitallowfullscreen=""> ></iframe> 

when access stream.php directly able view video in fullscreen. when access link using index.php not able load video in full screen. how can solve this?


Comments