diff --git a/common/lib/xmodule/xmodule/js/fixtures/video.html b/common/lib/xmodule/xmodule/js/fixtures/video.html index 675d750bcb..e658912885 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/video.html +++ b/common/lib/xmodule/xmodule/js/fixtures/video.html @@ -12,7 +12,6 @@ data-autoplay="False" data-yt-test-timeout="1500" data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/" - data-autohide-html5="True" >
diff --git a/common/lib/xmodule/xmodule/js/fixtures/video_all.html b/common/lib/xmodule/xmodule/js/fixtures/video_all.html index 41f3f94ad5..b774134cf7 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/video_all.html +++ b/common/lib/xmodule/xmodule/js/fixtures/video_all.html @@ -15,7 +15,6 @@ data-autoplay="False" data-yt-test-timeout="1500" data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/" - data-autohide-html5="True" > diff --git a/common/lib/xmodule/xmodule/js/fixtures/video_html5.html b/common/lib/xmodule/xmodule/js/fixtures/video_html5.html index d213b5a4b1..fcb5a3c319 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/video_html5.html +++ b/common/lib/xmodule/xmodule/js/fixtures/video_html5.html @@ -15,7 +15,6 @@ data-autoplay="False" data-yt-test-timeout="1500" data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/" - data-autohide-html5="True" > diff --git a/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html b/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html index f125f19777..ceb24299e9 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html +++ b/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html @@ -12,7 +12,6 @@ data-autoplay="False" data-yt-test-timeout="1500" data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/" - data-autohide-html5="True" > diff --git a/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html b/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html index c13d55713f..bf9272d230 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html +++ b/common/lib/xmodule/xmodule/js/fixtures/video_yt_multiple.html @@ -12,7 +12,6 @@ data-autoplay="False" data-yt-test-timeout="1500" data-yt-test-url="https://gdata.youtube.com/feeds/api/videos/" - data-autohide-html5="True" > diff --git a/common/lib/xmodule/xmodule/js/src/video/09_video_caption.js b/common/lib/xmodule/xmodule/js/src/video/09_video_caption.js index ef70127ccf..06a5ba7565 100644 --- a/common/lib/xmodule/xmodule/js/src/video/09_video_caption.js +++ b/common/lib/xmodule/xmodule/js/src/video/09_video_caption.js @@ -153,34 +153,33 @@ function () { ); if ((this.videoType === 'html5') && (this.config.autohideHtml5)) { - this.el.on('mousemove', this.videoCaption.autoShowCaptions); - this.el.on('keydown', this.videoCaption.autoShowCaptions); + this.el.on({ + mousemove, this.videoCaption.autoShowCaptions, + keydown, this.videoCaption.autoShowCaptions + }); // Moving slider on subtitles is not a mouse move, // but captions and controls should be shown. - this.videoCaption.subtitlesEl.on( - 'scroll', this.videoCaption.autoShowCaptions - ); - this.videoCaption.subtitlesEl.on( - 'scroll', this.videoControl.showControls - ); + this.videoCaption.subtitlesEl + .on( + 'scroll', this.videoCaption.autoShowCaptions + ) + .on( + 'scroll', this.videoControl.showControls + ); } else if (!this.config.autohideHtml5) { - this.videoCaption.subtitlesEl.on( - 'keydown', this.videoCaption.autoShowCaptions - ); + this.videoCaption.subtitlesEl.on({ + keydown: this.videoCaption.autoShowCaptions, - this.videoCaption.hideSubtitlesEl.on( - 'mousemove', this.videoCaption.autoShowCaptions - ); - this.videoCaption.hideSubtitlesEl.on( - 'keydown', this.videoCaption.autoShowCaptions - ); + // Moving slider on subtitles is not a mouse move, + // but captions should not be auto-hidden. + scroll: this.videoCaption.autoShowCaptions + }); - // Moving slider on subtitles is not a mouse move, - // but captions should not be auto-hidden. - this.videoCaption.subtitlesEl.on( - 'scroll', this.videoCaption.autoShowCaptions - ); + this.videoCaption.hideSubtitlesEl.on({ + mousemove: this.videoCaption.autoShowCaptions, + keydown: this.videoCaption.autoShowCaptions + }); } }