Commit 0f6e2594 by Valera Rozuvan

Merge pull request #127 from edx/anton/fix_event_tracking

Add additional events for tracking
parents 89da47a1 74426bdc
......@@ -140,12 +140,16 @@ class @VideoCaptionAlpha extends SubviewAlpha
hideCaptions: (hide_captions) =>
if hide_captions
type = 'hide_transcript'
@$('.hide-subtitles').attr('title', 'Turn on captions')
@el.addClass('closed')
else
type = 'show_transcript'
@$('.hide-subtitles').attr('title', 'Turn off captions')
@el.removeClass('closed')
@scrollCaption()
@video.log type,
currentTime: @player.currentTime
$.cookie('hide_captions', hide_captions, expires: 3650, path: '/')
captionHeight: ->
......
......@@ -45,6 +45,8 @@ class @VideoPlayerAlpha extends SubviewAlpha
if @video.show_captions is true
@caption = new VideoCaptionAlpha
el: @el
video: @video
player: @
youtubeId: @video.youtubeId('1.0')
currentSpeed: @currentSpeed()
captionAssetPath: @video.caption_asset_path
......@@ -277,11 +279,15 @@ class @VideoPlayerAlpha extends SubviewAlpha
toggleFullScreen: (event) =>
event.preventDefault()
if @el.hasClass('fullscreen')
type = 'not_fullscreen'
@$('.add-fullscreen').attr('title', 'Fill browser')
@el.removeClass('fullscreen')
else
type = 'fullscreen'
@el.addClass('fullscreen')
@$('.add-fullscreen').attr('title', 'Exit fill browser')
@video.log type,
currentTime: @currentTime
if @video.show_captions is true
@caption.resize()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment