diff --git a/lms/static/coffee/spec/modules/video/video_caption_spec.coffee b/lms/static/coffee/spec/modules/video/video_caption_spec.coffee index e816da593a..3fa6fa7daa 100644 --- a/lms/static/coffee/spec/modules/video/video_caption_spec.coffee +++ b/lms/static/coffee/spec/modules/video/video_caption_spec.coffee @@ -35,6 +35,9 @@ describe 'VideoCaption', -> it 'bind player resize event', -> expect($(@player)).toHandleWith 'resize', @caption.onWindowResize + it 'bind player seek event', -> + expect($(@player)).toHandleWith 'seek', @caption.onUpdatePlayTime + it 'bind player updatePlayTime event', -> expect($(@player)).toHandleWith 'updatePlayTime', @caption.onUpdatePlayTime diff --git a/lms/static/coffee/src/modules/video/video_caption.coffee b/lms/static/coffee/src/modules/video/video_caption.coffee index 7d796245bb..5dde796b78 100644 --- a/lms/static/coffee/src/modules/video/video_caption.coffee +++ b/lms/static/coffee/src/modules/video/video_caption.coffee @@ -10,6 +10,7 @@ class @VideoCaption $(window).bind('resize', @onWindowResize) $(@player).bind('resize', @onWindowResize) $(@player).bind('updatePlayTime', @onUpdatePlayTime) + $(@player).bind('seek', @onUpdatePlayTime) $(@player).bind('play', @onPlay) @$('.hide-subtitles').click @toggle @$('.subtitles').mouseenter(@onMouseEnter).mouseleave(@onMouseLeave)