0

I have a html document with media gallery:

<div class="videoTabClass" id="videoTab">
    <div id="videoGalleryTEST">
        <video controls="controls" preload="metadata" class="media-content" style="height: 150px;" title="" src="test.mp4"></video>
        <button onclick="makeFullScreen">
            Fullscreen
        </button>
    </div>
</div>

There is a function for button:

 function makeFullScreen(evt) {
     var testFullScreen = document.getElementById("videoGallery");
     var divObj = document.getElementById("videoGallery");

     if (divObj.requestFullscreen)   
       if (document.fullScreenElement) {
         document.exitFullscreen();       
       } else {
         divObj.requestFullscreen();
       }
     else if (divObj.msRequestFullscreen)**//true in simple *.html but undefined in asp.net**
       if (document.msFullscreenElement) {
         document.msExitFullscreen();
       } else {
        divObj.msRequestFullscreen();
       }
     else if (divObj.webkitRequestFullscreen)
       if (document.webkitFullscreenElement) {
         document.webkitCancelFullScreen();
       } else {
         divObj.webkitRequestFullscreen();
       }
    }

When I debug this code in simple html file everything is ok. My video gallery goes on fullscreen in all browsers. The problem appers when I debug this function in ASP.NET site. In Chrome and Mozilla browser it still OK, but in IE-11 there is no msRequestFullscreen() function for specified div element, it's just undefined. How asp.net affects on html elements?

artm
  • 8,554
  • 3
  • 26
  • 43
Mikhail Sokolov
  • 546
  • 1
  • 7
  • 18
  • When you are debugging in IE11, is the document mode what you expect it to be (edge/11)?. – MaxWillmott Feb 24 '15 at 09:08
  • I expect that msRequestFullscreen should be initialized as function(Method) in IE. At least in Chrome there is a function webkitRequestFullscreen(), but for some reason this function is absent in IE. – Mikhail Sokolov Feb 24 '15 at 16:33
  • I suspect ASP.NET is generating an ID for videoGallery. Do you have a runat="server" on that tag? If so set the ClientIDMode to static and try again. In IE11 requestFullscreen is supported. – garryp May 04 '15 at 12:58

0 Answers0