commit
de29903320
|
@ -37,13 +37,16 @@ if (document.documentElement.requestFullScreen) {
|
|||
H5P.fullScreenBrowserPrefix = '';
|
||||
}
|
||||
else if (document.documentElement.webkitRequestFullScreen) {
|
||||
H5P.safariBrowser = navigator.userAgent.match(/version\/([.\d]+)/i);
|
||||
H5P.safariBrowser = (H5P.safariBrowser === null ? 0 : parseInt(H5P.safariBrowser[1]));
|
||||
// This code has been changed to allow full screen in Moodle app.
|
||||
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
H5P.safariBrowser = 0;
|
||||
// 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.
|
||||
if (H5P.safariBrowser === 0 || H5P.safariBrowser > 6) {
|
||||
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
}
|
||||
// // Do not allow fullscreen for safari < 7.
|
||||
// if (H5P.safariBrowser === 0 || H5P.safariBrowser > 6) {
|
||||
// H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
// }
|
||||
}
|
||||
else if (document.documentElement.mozRequestFullScreen) {
|
||||
H5P.fullScreenBrowserPrefix = 'moz';
|
||||
|
|
|
@ -4,3 +4,4 @@ H5P library
|
|||
Changes:
|
||||
|
||||
1. The h5p.js file has been modified to make fullscreen work in the Moodle app. In line 34, the code inside the condition document.documentElement.webkitRequestFullScreen has changed, the original code has been commented.
|
||||
2. The h5p.js file has been modified to simulate a fake full screen in iOS. The H5P file now sends post messages to the app, and also listens to messages sent by the app to enter/exit full screen.
|
||||
|
|
Loading…
Reference in New Issue