File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 206206 // no tracks were found, probably because the captions module hasn't loaded
207207 // play video briefly (required to load the captions module)
208208 // and after the apiChange event is triggered, try again to retrieve tracks
209- this . youTubePlayer . addEventListener ( 'onApiChange' , function ( x ) {
209+ this . youTubePlayer . addEventListener ( 'onApiChange' , function ( ) {
210210
211211 // getDuration() also requires video to play briefly
212212 // so, let's set that while we're here
215215 if ( thisObj . loadingYouTubeCaptions ) {
216216 // loadingYouTubeCaptions is a stopgap in case onApiChange is called more than once
217217 ytTracks = thisObj . youTubePlayer . getOption ( 'captions' , 'tracklist' ) ;
218- if ( ! thisObj . okToPlay ) {
219- // Don't stopVideo() - that cancels loading
220- // Just pause
221- // No need to seekTo(0) - so little time has passed it isn't noticeable to the user
218+ if ( ! thisObj . okToPlay ) {
219+ // Don't stopVideo() - that cancels loading, just pause.
220+ // No need to seekTo(0) - the time passed isn't noticeable to the user
222221 thisObj . youTubePlayer . pauseVideo ( ) ;
223222 }
224223 if ( ytTracks && ytTracks . length ) {
You can’t perform that action at this time.
0 commit comments