OPPG-473: Safari now use fake fullscreen.

Which is better than real fullscreen IMNSVHO...
namespaces
Frank Ronny Larsen 2013-07-18 15:58:52 +02:00
parent 7736506b39
commit bd1f25448b
1 changed files with 13 additions and 2 deletions

View File

@ -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
*/