File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ <h2>Musicians' Helper - Repeater</h2>
114114
115115 <!-- Video Player Column -->
116116 < div class ="col-md-6 col-sm-12 text-center ">
117- < div id =" player-wrapper " class ="sticky-top ">
117+ < div class ="sticky ">
118118 < div id ="player " style ="display:none "> </ div >
119119 </ div >
120120 </ div >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ function onYouTubeIframeAPIReady() {
3333 playerHeight = 180 ;
3434 }
3535
36- player = new YT . Player ( 'player' , {
36+ player = new YT . Player ( getPlayerId ( ) , {
3737 height : playerHeight . toString ( ) ,
3838 width : playerWidth . toString ( ) ,
3939 events : {
@@ -117,7 +117,7 @@ function reset() {
117117 player . stopVideo ( ) ;
118118 $ ( '#duration' ) . val ( '' ) ;
119119 $ ( '#start' ) . val ( '' ) ;
120- $ ( '#player' ) . hide ( ) ;
120+ getJQueryPlayer ( ) . hide ( ) ;
121121}
122122
123123function processFile ( file_contents ) {
@@ -182,7 +182,7 @@ $('#video-url').change( function () {
182182 reset ( ) ;
183183 $this . addClass ( 'is-invalid' ) ;
184184 } else {
185- $ ( '#player' ) . show ( ) ;
185+ getJQueryPlayer ( ) . show ( ) ;
186186 $this . removeClass ( 'is-invalid' ) ;
187187 player . loadVideoById ( video_id ) ;
188188 videoChanged = true ;
@@ -290,6 +290,14 @@ function handleFile() {
290290 reader . readAsText ( fileList [ 0 ] ) ;
291291}
292292
293+ function getPlayerId ( ) {
294+ return 'player' ;
295+ }
296+
297+ function getJQueryPlayer ( ) {
298+ return $ ( '#' + getPlayerId ( ) ) ;
299+ }
300+
293301$ ( document ) . ready ( function ( ) {
294302 bsCustomFileInput . init ( )
295303
Original file line number Diff line number Diff line change 107107 font-size : 2rem ;
108108 }
109109}
110+
111+ @media (min-width : 768px ) {
112+ .sticky {
113+ position : sticky;
114+ top : 0 ;
115+ z-index : 1030 ;
116+ }
117+ }
You can’t perform that action at this time.
0 commit comments