Skip to content

Commit 0214f1f

Browse files
committed
Remove unused variable, minor changes to comments
1 parent b2641d2 commit 0214f1f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

scripts/youtube.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
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
@@ -215,10 +215,9 @@
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) {

0 commit comments

Comments
 (0)