Skip to content

Instantly share code, notes, and snippets.

@pgdaniel
Created October 23, 2013 15:44
Show Gist options
  • Save pgdaniel/7121141 to your computer and use it in GitHub Desktop.
Save pgdaniel/7121141 to your computer and use it in GitHub Desktop.
videojs problem
videojs @$("video")[0], {
1 techOrder: ["html5", "flash"]
2 preload: "auto"
3 }, () ->
4 @videoPlayer = @
5 console.log "VID PLAYER"
6 console.log @videoPlayer
7
8 SQ.Widget.Application.hideLoader()
9
10 @videoPlayer.on "play", @_onVideoPlay
11 @videoPlayer.on "ended", @_onVideoEnded
12
13 $(window).bind "resize", @_onResize
@pgdaniel
Copy link
Author

@patbenatar can you see anything I'm doing wrong here? vjs got rid of the addEvent and are now using on... when it tries to bind I get Cannot read property 'guid' of undefined the player itself works

@patbenatar
Copy link

Can you paste the definitions of _onVideoPlay and _onVideoEnded here?

@pgdaniel
Copy link
Author

@patbenatar

_onVideoPlay: =>
  @$overlay.hide()
  @$overlayAfter.hide()

_onVideoEnded: =>
  unless @voted
   @$overlayAfter.show()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment