googlearchive / vrview

Library for embedding immersive media into traditional websites.
http://developers.google.com/cardboard/vrview
Apache License 2.0
1.71k stars 1.09k forks source link

[REQUEST] VRView fullscreen api access #118

Open jroru opened 7 years ago

jroru commented 7 years ago

I think it would be a very useful feature to be able to programmatically send the VRView into fullscreen mode.

For example in my case I desire the VRView to not be usable in its non-fullscreen state, and for any clicks on the element to send it to fullscreen.

I think this should also be paired with having a fullscreen event that can be listened to and dealt with accordingly.

georgedumontier commented 7 years ago

Maybe not what you're looking for, but you could fake fullscreen mode with some css. This is for an iframe inside the body. I used this to force fullscreen mode on mobile. It's not truly fullscreen. More like borderless windowed.

body{
    position:relative;
    height:100vh;
    width:100%;
    margin:0;
    padding:0;
  }
  iframe{
    position:absolute;
    height:100%;
    border:none;
    width:100%

  }