-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use the "Player" API? #26
Comments
hi @EvilJohnny, The way it works is the With that said, you should be able to get the current time like this:
I will try to update the documentation to make this a bit more clear. Let me know if that works out for you! |
I see! Sweet! Then the problem might be a different one... Because if I call <video class="video-js vjs-default-skin"
ng-src="{{video.videoUrl}}"
vjs-video
data-setup="{}"
controls
width="320" height="180">
</video> So 'vjsVideoReady' is fired but seems that "ng-src" still didn't add the correct url to the src attribute (at some point it does, because the video loads and plays clicking on play button). Any clues? (Maybe I should close this issue and add a different one for this?) |
Solved it with this workaround: scope.$on('vjsVideoReady', function(evt, videoData) {
if (!videoData.vid.tag.src) {
$timeout(function() {
scope.loadVideo(videoData);
});
}else {
scope.loadVideo(videoData);
}
}); And in the |
Hmm, what version of video.js are you using? I think I may have found a bug with the timing on when |
The version is 4.2 😃 Anyways the workaround is pretty easy. |
Hi, first of all, thanks for this directive :)
I've been a while playing around with this, but I definitely don't know how to do it. I need to access the methods of the Player API : http://docs.videojs.com/docs/api/player.html, so I can manually control the position of the video, get the video currentTime, etc.
My last try was something like this:
But I am getting the following error:
The video.js version seems to be 4.2, according to
window.videojs.CDN_VERSION
(I entered to an ongoing project in my company, so the videojs library was already there, that's what I am looking at that CDN_VERSION property).Any clues about how to achieve what I want?
The text was updated successfully, but these errors were encountered: