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

Feature request: seek() callback function or promise #1347

Closed
dylancom opened this issue Nov 25, 2018 · 1 comment
Closed

Feature request: seek() callback function or promise #1347

dylancom opened this issue Nov 25, 2018 · 1 comment

Comments

@dylancom
Copy link

Current behavior

The seek method has a small delay. After calling seek(), the onProgress method doesn't immediately return the new progress position. Therefore I would like to be able to know when the seek() method finished.

Reproduction steps

I have a progress bar(slider) below the video player that allows you to seek the video by dragging.
In a normal state it, the progress bar will show the progress of the video and when you are dragging, the progress bar will show the dragging position.

In order to determine what to show, I have a onSeeking boolean, so the progress bar understands when to show the progress of the video / or the dragging position.

When someone completed dragging, the seek() method get's called and onSeeking will be set to false.
Because seek doesn't directly put the video in the new position (small delay), the progress bar will jump shortly after dragging back to it's original position and quickly after that to the new seeked position.

Expected behavior

In order to not make the progress bar jump after dragging, I would like seek to have a callback or return a promise so I can set my onSeeking boolean to false after the seek() method finished seeking.

Platform

  • iOS
@dylancom dylancom changed the title Feature request: Seek callback for when it's finished Feature request: seek() callback for when it's finished Nov 25, 2018
@dylancom dylancom changed the title Feature request: seek() callback for when it's finished Feature request: seek() callback function or promise Nov 25, 2018
@cobarx
Copy link
Contributor

cobarx commented Nov 28, 2018

There actually is a callback that fires when the seek completes, except it wasn't documented lol so good luck knowing about that. When I started looking at the code I also discovered that the Android implementations report the time before the seek, so I had to fix that.

I've merged #1351 to address this.

@cobarx cobarx closed this as completed Nov 28, 2018
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