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.
In Video.js 4.0, addEvent was replace by 'on'.
v.on('play', fn);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With