Skip to content

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

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

player.getDuration() return NaN or 0 #1910

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

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

Copy link
Contributor

github-actions bot commented Aug 4, 2024

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.

@github-actions github-actions bot added the Stale label Aug 4, 2024
Copy link
Contributor

This issue was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants