Commit 74426bdc by Anton Stupak Committed by Valera Rozuvan

Add tracking of additional events

parent 89da47a1
...@@ -140,12 +140,16 @@ class @VideoCaptionAlpha extends SubviewAlpha ...@@ -140,12 +140,16 @@ class @VideoCaptionAlpha extends SubviewAlpha
hideCaptions: (hide_captions) => hideCaptions: (hide_captions) =>
if hide_captions if hide_captions
type = 'hide_transcript'
@$('.hide-subtitles').attr('title', 'Turn on captions') @$('.hide-subtitles').attr('title', 'Turn on captions')
@el.addClass('closed') @el.addClass('closed')
else else
type = 'show_transcript'
@$('.hide-subtitles').attr('title', 'Turn off captions') @$('.hide-subtitles').attr('title', 'Turn off captions')
@el.removeClass('closed') @el.removeClass('closed')
@scrollCaption() @scrollCaption()
@video.log type,
currentTime: @player.currentTime
$.cookie('hide_captions', hide_captions, expires: 3650, path: '/') $.cookie('hide_captions', hide_captions, expires: 3650, path: '/')
captionHeight: -> captionHeight: ->
......
...@@ -45,6 +45,8 @@ class @VideoPlayerAlpha extends SubviewAlpha ...@@ -45,6 +45,8 @@ class @VideoPlayerAlpha extends SubviewAlpha
if @video.show_captions is true if @video.show_captions is true
@caption = new VideoCaptionAlpha @caption = new VideoCaptionAlpha
el: @el el: @el
video: @video
player: @
youtubeId: @video.youtubeId('1.0') youtubeId: @video.youtubeId('1.0')
currentSpeed: @currentSpeed() currentSpeed: @currentSpeed()
captionAssetPath: @video.caption_asset_path captionAssetPath: @video.caption_asset_path
...@@ -277,11 +279,15 @@ class @VideoPlayerAlpha extends SubviewAlpha ...@@ -277,11 +279,15 @@ class @VideoPlayerAlpha extends SubviewAlpha
toggleFullScreen: (event) => toggleFullScreen: (event) =>
event.preventDefault() event.preventDefault()
if @el.hasClass('fullscreen') if @el.hasClass('fullscreen')
type = 'not_fullscreen'
@$('.add-fullscreen').attr('title', 'Fill browser') @$('.add-fullscreen').attr('title', 'Fill browser')
@el.removeClass('fullscreen') @el.removeClass('fullscreen')
else else
type = 'fullscreen'
@el.addClass('fullscreen') @el.addClass('fullscreen')
@$('.add-fullscreen').attr('title', 'Exit fill browser') @$('.add-fullscreen').attr('title', 'Exit fill browser')
@video.log type,
currentTime: @currentTime
if @video.show_captions is true if @video.show_captions is true
@caption.resize() @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