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

seekToTime is not accurate #167

Open
ghost opened this issue Jun 28, 2020 · 5 comments
Open

seekToTime is not accurate #167

ghost opened this issue Jun 28, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 28, 2020

This is a part of my code (and it works as expected) :

let pos = 12345;
console.info( "check 1: ",  vid.getCurrentTime() );
vid.seekToTime( pos );
console.info( "check 2: ", vid.getCurrentTime() );
setTimeout( _ => { console.info( "check 3: ", vid.getCurrentTime() ); } , 500 );

the result is:

JS: check 1:  2174
JS: check 2:  12345
JS: check 3:  12713

now here is my problem: let's change the pos value to 10345

the result would be:

JS: check 1:  2095
JS: check 2:  10345
JS: check 3:  2948

just pay attention to the check 3 it shifts back! and that is my problem.

@ghost
Copy link
Author

ghost commented Jun 29, 2020

It seems that the video splits in 3sec sections, and the video can just to be sought only at the beginning of each section, is there any way to solve this problem?

@chris-praxis
Copy link

chris-praxis commented Jul 20, 2022

I have this problem on Android. On iOS it starts play just prior to my seek target, which is fine, but on Android it's WAY off, sometimes half the video off. i.e. I try to seek to the middle of an 8s video and it starts at the beginning. I also noticed that on Android the 'seekToTimeCompleteEvent' is fired immediately by 'seekToTime' as well as later when seeking actually completes (and it's way off)... makes no sense to me. I could really use a fix for this.

@chris-praxis
Copy link

My videos are .mp4, H.264, AAC 48 kHz

@chris-praxis
Copy link

chris-praxis commented Aug 17, 2022

output1.txt
My video is 6.3s long. I try to seek to somewhere near the end (4s+) and at the seek end signal (seekToTimeCompleteEvent) the new position is exactly what I seeked to, but then it inexplicably jumps back to near the beginning of the video. I tried omitting the 'player.start()' call after the seek completes but doing so did not fix the problem.

@chris-praxis
Copy link

Also I've removed the 'sendEvent(VideoCommon.seekToTimeCompleteEvent' in 'seekToTime' which seems like a bug.

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

1 participant