-
Notifications
You must be signed in to change notification settings - Fork 857
player.getDuration() return NaN or 0 #1910
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
Comments
Hi @DanieleSuppo73 ! Doing some tests I noticed that the To solve it momentarily, if you delay the call to the |
As I also stumbled over this issue I found a maybe better way: clappr provides a timeupdate event |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This issue was closed because it has been stalled for 10 days with no activity. |
I don't know if it's a bug, or I'm missing something:
I should get the video duration when the video is ready, but with my videos it return 0, with the provided demo video it return NaN
Browser: FILL WITH YOUR BROWSER (ex: Chrome Version 46.0.2490.80, Firefox Version 3.5.6, IE 11)
Chrome
OS: FILL WITH YOUR OS (ex: Mac OS 10.11.1, iOS9, android4.5)
Windows 10
Clappr Version: 0.3.8
Steps to reproduce:
var playerElement = document.getElementById("player-wrapper");
var player = new Clappr.Player({
source: 'http://clappr.io/highline.mp4',
poster: 'http://clappr.io/poster.png',
mute: true,
height: 360,
width: 640
});
player.listenTo(player, Clappr.Events.PLAYER_READY, () => {
console.log("Video ready");
console.log(player.getDuration()) /// NaN
});
player.attachTo(playerElement);
Did you try to reproduce this issue at http://cdn.clappr.io/
YES
ps: you can attach images, logs or whatever you think might be helpful.
ps: feel free to clean this if your issue is different.
The text was updated successfully, but these errors were encountered: