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

Is there any way to pause Shaka player when it is loaded, at certain duration? #2510

Closed
vishwajeetv opened this issue Apr 19, 2020 · 3 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@vishwajeetv
Copy link

vishwajeetv commented Apr 19, 2020

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
2.6.10 2.5.10

Please ask your question
Is there any configuration that I can pass so that the Shaka Player pauses itself at certain duration/point in the video? , for e.g. I want to pause player on 300 seconds.

One way is to change playRangeEnd configuration, but that messes the user experience Is there any alternative?

https://stackoverflow.com/questions/61301420/how-to-pause-shaka-player-after-it-is-loaded

@vishwajeetv vishwajeetv added the type: question A question from the community label Apr 19, 2020
@TheModMaker
Copy link
Contributor

You could use the timeupdate event from the video and wait until the current time reaches that time:

video.addEventListener('timeupdate', () => {
  if (video.currentTime >= 300)
    video.pause();
});

@shaka-bot
Copy link
Collaborator

@vishwajeetv Does this answer all your questions? Can we close the issue?

@shaka-bot shaka-bot added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 23, 2020
@vishwajeetv
Copy link
Author

Hi @TheModMaker , thanks for the answer. This solves the problem. So this is related to the native video element itself, not with the shake player.
@shaka-bot I am closing the issue.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 27, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Jun 26, 2020
@TheModMaker TheModMaker self-assigned this Aug 19, 2020
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants