Added support for resize and fullscreen.
Removed fullscreen from Android. (does not work) Removed mute from Android and iPad. (does not work)namespaces
parent
45627c8c65
commit
2ff1c26b23
10
js/h5p.js
10
js/h5p.js
|
@ -12,16 +12,16 @@ H5P.init = function () {
|
|||
}
|
||||
|
||||
if (H5P.fullScreenBrowserPrefix === undefined) {
|
||||
if (document.cancelFullScreen) {
|
||||
if (document.documentElement.requestFullScreen) {
|
||||
H5P.fullScreenBrowserPrefix = '';
|
||||
}
|
||||
else if (document.webkitCancelFullScreen) {
|
||||
else if (document.documentElement.webkitRequestFullScreen && navigator.userAgent.indexOf('Android') === -1) { // Skip Android
|
||||
H5P.fullScreenBrowserPrefix = 'webkit';
|
||||
}
|
||||
else if (document.mozCancelFullScreen) {
|
||||
else if (document.documentElement.mozRequestFullScreen) {
|
||||
H5P.fullScreenBrowserPrefix = 'moz';
|
||||
}
|
||||
else if (document.msCancelFullScreen) {
|
||||
else if (document.documentElement.msRequestFullScreen) {
|
||||
H5P.fullScreenBrowserPrefix = 'ms';
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,9 @@ H5P.fullScreen = function ($el, obj) {
|
|||
return;
|
||||
}
|
||||
$el.add(H5P.$body).removeClass('h5p-fullscreen');
|
||||
if (obj.resize !== undefined) {
|
||||
obj.resize(false);
|
||||
}
|
||||
document.removeEventListener(eventName, arguments.callee, false);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue