Applied fix for Safari full screen in version > 9

Big thanks to Lest@t at Drupal for providing the patch.
HFP-342
pull/27/head
thomasmars 2016-12-12 11:22:34 +01:00
parent bc28592e48
commit d76ce3f3a5
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ if (document.documentElement.requestFullScreen) {
H5P.fullScreenBrowserPrefix = '';
}
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]));
// Do not allow fullscreen for safari < 7.