Skip to content
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

player.getDuration() return NaN or 0 #1910

Open
DanieleSuppo73 opened this issue Mar 14, 2020 · 2 comments · May be fixed by clappr/clappr-core#50
Open

player.getDuration() return NaN or 0 #1910

DanieleSuppo73 opened this issue Mar 14, 2020 · 2 comments · May be fixed by clappr/clappr-core#50
Labels

Comments

@DanieleSuppo73
Copy link

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.

@joaopaulovieira
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants