In my ember application i have installes videojs using npm install --save-dev video.js bower install video.js
in my hbs code is:
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
javascript code is: var player = videojs('my-player');
var options = {};
var player = videojs('my-player', options, function onPlayerReady() {
videojs.log('Your player is ready!');
// In this context, this
is the player that was created by Video.js.
this.play();
// How about an event listener?
this.on('ended', function() {
videojs.log('Awww...over so soon?!');
});
});
how to add this javascript code in controllers..
Aucun commentaire:
Enregistrer un commentaire