OPPG-473: Safari now use fake fullscreen.
Which is better than real fullscreen IMNSVHO...namespaces
parent
7736506b39
commit
bd1f25448b
15
js/h5p.js
15
js/h5p.js
|
@ -16,7 +16,18 @@ H5P.init = function () {
|
|||
H5P.fullScreenBrowserPrefix = '';
|
||||
}
|
||||
else if (document.documentElement.webkitRequestFullScreen && navigator.userAgent.indexOf('Android') === -1) { // Skip Android
|
||||
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
// Safari has stopped working as of v6.0.3. (Specifying keyboard input
|
||||
// makes webkitRequestFullScreen silently fail.) The following code
|
||||
// assumes that the Safari developers figure out how to properly handle
|
||||
// their own extension before reaching version 6.0.10. Until then, we
|
||||
// treat Safari as an old IE. (Please note: Just looking for Safari in
|
||||
// the UA string will also match Chrome.)
|
||||
if (navigator.userAgent.match(/Version\/6\.0\.[3-9].*Safari/)) {
|
||||
H5P.fullScreenBrowserPrefix = undefined;
|
||||
}
|
||||
else {
|
||||
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
}
|
||||
}
|
||||
else if (document.documentElement.mozRequestFullScreen) {
|
||||
H5P.fullScreenBrowserPrefix = 'moz';
|
||||
|
@ -197,7 +208,7 @@ H5P.libraryFromString = function (library) {
|
|||
|
||||
/**
|
||||
* Get the path to the library
|
||||
*
|
||||
*
|
||||
* @param {string} machineName The machine name of the library
|
||||
* @returns {string} The full path to the library
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue