Applied fix for Safari full screen in version > 9
Big thanks to Lest@t at Drupal for providing the patch. HFP-342pull/27/head
parent
bc28592e48
commit
d76ce3f3a5
|
@ -32,7 +32,7 @@ if (document.documentElement.requestFullScreen) {
|
||||||
H5P.fullScreenBrowserPrefix = '';
|
H5P.fullScreenBrowserPrefix = '';
|
||||||
}
|
}
|
||||||
else if (document.documentElement.webkitRequestFullScreen) {
|
else if (document.documentElement.webkitRequestFullScreen) {
|
||||||
H5P.safariBrowser = navigator.userAgent.match(/Version\/(\d)/);
|
H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i);
|
||||||
H5P.safariBrowser = (H5P.safariBrowser === null ? 0 : parseInt(H5P.safariBrowser[1]));
|
H5P.safariBrowser = (H5P.safariBrowser === null ? 0 : parseInt(H5P.safariBrowser[1]));
|
||||||
|
|
||||||
// Do not allow fullscreen for safari < 7.
|
// Do not allow fullscreen for safari < 7.
|
||||||
|
@ -497,7 +497,7 @@ H5P.semiFullScreen = function ($element, instance, exitCallback, body) {
|
||||||
* @param {Object} instance
|
* @param {Object} instance
|
||||||
* @param {function} exitCallback Callback function called when user exits fullscreen.
|
* @param {function} exitCallback Callback function called when user exits fullscreen.
|
||||||
* @param {H5P.jQuery} $body For internal use. Gives the body of the iframe.
|
* @param {H5P.jQuery} $body For internal use. Gives the body of the iframe.
|
||||||
* @param {Boolean} forceSemiFullScreen
|
* @param {Boolean} forceSemiFullScreen
|
||||||
*/
|
*/
|
||||||
H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFullScreen) {
|
H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFullScreen) {
|
||||||
if (H5P.exitFullScreen !== undefined) {
|
if (H5P.exitFullScreen !== undefined) {
|
||||||
|
|
Loading…
Reference in New Issue