Commit 1625125e by kimth

Respect object boundaries

parent c0310200
......@@ -12,6 +12,8 @@ class @Video
$("#video_#{@id}").data('video', this).addClass('video-load-complete')
@hide_captions = $.cookie('hide_captions') == 'true'
if YT.Player
@embed()
else
......@@ -19,11 +21,6 @@ class @Video
$('.course-content .video').each ->
$(this).data('video').embed()
if $.cookie('hide_captions') == 'true'
@el.addClass('closed')
else
@el.removeClass('closed')
youtubeId: (speed)->
@videos[speed || @speed]
......
class @VideoPlayer extends Subview
initialize: ->
console.log(@['video'].hide_captions)
# Define a missing constant of Youtube API
YT.PlayerState.UNSTARTED = -1
......
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