full keyboard control in fullscreen using chrome in sharing #1881
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
f95dbdd404
commit
bf00de4425
|
@ -812,6 +812,7 @@
|
|||
|
||||
// Enter browser fullscreen
|
||||
function enterBrowserFullscreen(elem) {
|
||||
if (navigator.keyboard && navigator.keyboard.lock) { navigator.keyboard.lock(); }
|
||||
if (elem.requestFullscreen) { elem.requestFullscreen(); }
|
||||
else if (elem.msRequestFullscreen) { elem.msRequestFullscreen(); }
|
||||
else if (elem.mozRequestFullScreen) { elem.mozRequestFullScreen(); }
|
||||
|
@ -824,6 +825,7 @@
|
|||
else if (document.msExitFullscreen) { document.msExitFullscreen(); }
|
||||
else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); }
|
||||
else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); }
|
||||
if (navigator.keyboard && navigator.keyboard.unlock) { navigator.keyboard.unlock(); }
|
||||
}
|
||||
|
||||
// Return true if the browser is fullscreen. This is a delayed method that will return true/false late. Not very useful.
|
||||
|
|
Loading…
Reference in New Issue