File tree Expand file tree Collapse file tree
sourcecode/apis/contentauthor/public/js/videos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,17 @@ H5P.VideoBrightcove = (function ($) {
5555 if ( options . controls !== true ) {
5656 player . bigPlayButton . hide ( ) ;
5757 }
58+ if ( options . disableFullscreen === true ) {
59+ if ( player . controlBar && player . controlBar . fullscreenToggle ) {
60+ player . controlBar . fullscreenToggle . hide ( ) ;
61+ }
62+ player . on ( 'play' , function ( ) {
63+ // Some players re-enable fullscreen on play or have it in a state that needs re-hiding
64+ if ( player . controlBar && player . controlBar . fullscreenToggle ) {
65+ player . controlBar . fullscreenToggle . hide ( ) ;
66+ }
67+ } ) ;
68+ }
5869 player . on ( 'loadedmetadata' , function ( ) {
5970 self . trigger ( 'loaded' ) ;
6071 self . playerTracks = filterTracks ( player ) ;
@@ -82,6 +93,9 @@ H5P.VideoBrightcove = (function ($) {
8293
8394 self . appendTo = function ( $container ) {
8495 $container . addClass ( 'h5p-brightcove' ) . append ( $wrapper ) ;
96+ if ( options . disableFullscreen === true ) {
97+ $container . addClass ( 'h5p-disable-fullscreen' ) ;
98+ }
8599 create ( ) ;
86100 } ;
87101
You can’t perform that action at this time.
0 commit comments