locked
Video exitfullscreen mode programatically

    Question

  • Hi all,

    I have a scenario where the video plays in fullscreen mode. for this, I am calling the method msRequestFullscreen and it works fine. In another scenario, I need to make this video to paly in windows mode without user's input. How to get this programmatically? msExitFullscreen() is not supported for Windows 8 apps. Please let me know how to switch to windows mode programmatically?

    Thanks in advance


    Nazia

    Tuesday, December 24, 2013 8:29 AM

Answers

  • Hi Nazia,

    Sorry, I forget that you are developing for Win8.0 app and if you read the documentation, the feature is newly supported in IE11, while Win8.0 Store App use IE10 render engine, therefore you could not manually full screen or exist full screen by using msRequestFullscreen or msExitFullscreen.

    Actually I don't know how you make msRequestFullscreen work, but when I test it with Win8.0 project, the code is not working at all.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, December 27, 2013 1:46 AM
    Moderator

All replies

  • Hi Nazia,

    How you call the msExitFullScreen() method? You have to find the full screen element first before you use this method. Take a look at:http://msdn.microsoft.com/en-us/library/windows/apps/jj879314.aspx

    The sample could be:

        function reset() {
          var previousFullScreen = document.fullScreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;
          if (previousFullScreen) {
            //cancelFullScreen is not implemented yet.
            if (previousFullScreen.cancelFullScreen) {
              previousFullScreen.cancelFullScreen();
            }
            else if (previousFullScreen.msExitFullscreen) {
              previousFullScreen.msExitFullscreen();
            }
            else if (previousFullScreen.mozCancelFullScreen) {
              previousFullScreen.mozCancelFullScreen();
            }
            else if (previousFullScreen.webkitCancelFullScreen) {
              previousFullScreen.webkitCancelFullScreen();
            }
          }
          return;
        }
    

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, December 25, 2013 2:21 AM
    Moderator
  • Thanks for the response Jamles.

    The properties specified in the above code snippet does not works for Windows 8 apps.


    Nazia

    Thursday, December 26, 2013 4:43 AM
  • Hi Nazia,

    Sorry, I forget that you are developing for Win8.0 app and if you read the documentation, the feature is newly supported in IE11, while Win8.0 Store App use IE10 render engine, therefore you could not manually full screen or exist full screen by using msRequestFullscreen or msExitFullscreen.

    Actually I don't know how you make msRequestFullscreen work, but when I test it with Win8.0 project, the code is not working at all.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, December 27, 2013 1:46 AM
    Moderator