Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flowplayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

global $fv_wp_flowplayer_ver;
$fv_wp_flowplayer_ver = '7.5.29.7212.8';
$fv_wp_flowplayer_ver = '7.5.29.7212.9';
$fv_wp_flowplayer_core_ver = '7.2.12.1';
include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
if( file_exists( dirname( __FILE__ ) . '/includes/module.php' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion flowplayer/fv-player.min.js

Large diffs are not rendered by default.

24 changes: 21 additions & 3 deletions flowplayer/modules/fullscreen-fix.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ flowplayer(function(player, root) {
} else {
['exitFullscreen', 'webkitCancelFullScreen', 'mozCancelFullScreen', 'msExitFullscreen'].forEach(function(fName) {
if (typeof document[fName] === 'function') {
document[fName]();
if( document.fullscreenElement ) {
document[fName]();
}
}
});
}
Expand Down Expand Up @@ -114,6 +116,9 @@ flowplayer(function(player, root) {

player.isFullscreen = true;

// Add fullscreen video to navigation history, with the fv_player_fullscreen state variable
history.pushState( { fv_player_fullscreen: true }, false, location.href );

}).on(FS_EXIT, function() {
var oldOpacity;
common.toggleClass(root, 'fp-minimal', common.hasClass(root, 'fp-minimal-fullscreen'));
Expand All @@ -134,7 +139,13 @@ flowplayer(function(player, root) {

if( player.engine.engineName != 'fvyoutube' ){ // youtube scroll ignore
win.scrollTo(scrollX, scrollY);
}
}

// If the history state variable fv_player_fullscreen is present, we need to go back in history to remove that extra history entry
if( history.state && history.state.fv_player_fullscreen ) {
history.back();
}

}).on('unload', function() {
if (player.isFullscreen) player.fullscreen();
});
Expand Down Expand Up @@ -164,4 +175,11 @@ flowplayer(function(player, root) {
parent = parent.parentNode;
}
}
});
});

window.addEventListener( 'popstate', function() {
var instance = flowplayer('.is-fullscreen.is-ready');
if( instance ) {
instance.fullscreen( false );
}
} );
17 changes: 16 additions & 1 deletion flowplayer/modules/fullscreen-force.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,18 @@ flowplayer(function(api, root) {
api.isFakeFullscreen = flag;
api.trigger( flag ? 'fakefullscreen' : 'fakefullscreen-exit', [api] );
root.toggleClass('is-fullscreen fake-fullscreen forced-fullscreen',flag)
if( flag ) {
if( flag ) {
root.css('position','fixed');

// Add fullscreen to navigation history, with the fv_player_fake_fullscreen state variable
history.pushState( { fv_player_fake_fullscreen: true }, false, location.href );
} else {
root.css('position',position);

// If the history state variable fv_player_fake_fullscreen is present, we need to go back in history to remove that extra history entry
if( history.state && history.state.fv_player_fake_fullscreen ) {
history.back();
}
}
}
}
Expand Down Expand Up @@ -174,4 +182,11 @@ flowplayer(function(api, root) {
}
}

});

window.addEventListener( 'popstate', function() {
var instance = flowplayer('.fake-fullscreen');
if( instance ) {
instance.fakeFullscreen( false );
}
});
22 changes: 22 additions & 0 deletions js/fancybox.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.