Fix for fullscreen issues on Firefox

Fixes #38
This commit is contained in:
Sam Potts
2015-03-02 20:16:44 +11:00
parent b6d5ba43ec
commit 26bd4d0833
5 changed files with 11 additions and 8 deletions

View File

@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
// plyr.js v1.0.17
// plyr.js v1.0.19
// https://github.com/sampotts/plyr
// ==========================================================================
// Credits: http://paypal.github.io/accessible-html5-video-player/
@ -795,12 +795,12 @@
}
// Toggle fullscreen
function _toggleFullscreen() {
function _toggleFullscreen(event) {
// Check for native support
var nativeSupport = fullscreen.supportsFullScreen;
// If it's a fullscreen change event, it's probably a native close
if(event.type === fullscreen.fullScreenEventName) {
if(event && event.type === fullscreen.fullScreenEventName) {
config.fullscreen.active = fullscreen.isFullScreen();
}
// If there's native support, use it