Reputation: 1740
I've got videojs installed and working for playback of videos, however when I try to use the API I am hitting some issues
For example:
_V_("video").ready(function() {
v = this
v.play()
}
Works as expected, playing the video once everything has loaded.
However, tracking a click on the play event thus:
_V_("video").ready(function() {
v = this
v.addEvent('play', function() { console.log('play') })
}
Gives me:
Uncaught TypeError: Object [object Object] has no method 'addEvent'
I'm not sure what I am doing wrong as I am following the API docs.
Upvotes: 6
Views: 2358