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

Video play duration #6

Open
zimmerlis opened this issue May 15, 2022 · 1 comment
Open

Video play duration #6

zimmerlis opened this issue May 15, 2022 · 1 comment

Comments

@zimmerlis
Copy link

Video slideshow with several mp4 videos change exactly after 3000 ms to the next video.
For me it would make more sense to skip the slideshow.speed on videos and use the video duration instead.

@teachers-uk-net
Copy link

Hi

Yes, just for anyone els ewho comes across this and wants a solution, I added an attribute to the video element vid.setAttribute('id', slideshow.media[counter]); and then in function loaded():

wrapper.dataset.loaded = 'true';
let curr = document.getElementById(slideshow.media[counter]);
  if (curr != null) {
    speed = curr.duration*1000
  } else {
    speed = 3000
  }

Might be an even better way to do it but also think this would address #2 as well.

Kind regards

Stuart

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

No branches or pull requests

2 participants