Add tracking of additional events

This commit is contained in:
Anton Stupak
2013-06-11 17:55:16 +03:00
committed by Valera Rozuvan
parent 89da47a134
commit 74426bdcc6
2 changed files with 10 additions and 0 deletions

View File

@@ -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: ->

View File

@@ -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()