HFJ-146: Disabled real full screen in Safari.
parent
b3c3aed32a
commit
b65e28f449
18
js/h5p.js
18
js/h5p.js
|
@ -25,20 +25,10 @@ H5P.init = function () {
|
||||||
H5P.fullScreenBrowserPrefix = '';
|
H5P.fullScreenBrowserPrefix = '';
|
||||||
}
|
}
|
||||||
else if (document.documentElement.webkitRequestFullScreen
|
else if (document.documentElement.webkitRequestFullScreen
|
||||||
&& navigator.userAgent.indexOf('Android') === -1 // Skip Android
|
&& navigator.userAgent.indexOf('Android') === -1 // Skip Android
|
||||||
) {
|
&& navigator.userAgent.indexOf('Version/') === -1 // Skip Safari
|
||||||
// Safari has stopped working as of v6.0.3. (Specifying keyboard input
|
) {
|
||||||
// makes webkitRequestFullScreen silently fail.) The following code
|
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||||
// 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) {
|
else if (document.documentElement.mozRequestFullScreen) {
|
||||||
H5P.fullScreenBrowserPrefix = 'moz';
|
H5P.fullScreenBrowserPrefix = 'moz';
|
||||||
|
|
Loading…
Reference in New Issue