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

How to get accurate response from mediaPlayer.getTime() #74

Closed
Abu-Abdullah opened this issue Jul 30, 2012 · 1 comment
Closed

How to get accurate response from mediaPlayer.getTime() #74

Abu-Abdullah opened this issue Jul 30, 2012 · 1 comment

Comments

@Abu-Abdullah
Copy link

Hi,

I'm reading the mediaPlayer.getTime() within UpdateRunnable every 0.1 second:
executorService.scheduleAtFixedRate(new UpdateRunnable(player), 0L, 100L, TimeUnit.MILLISECONDS);

The results for example:
1114240
1114240
1114493
1114493
1114493
1114746
1114746
1114999
1114999
1114999
1115271
1115271
1115524
1115524
1115524
1115777
1115777

as you can see I have the same reading every 300/200 ms instead of different reading every 100 ms. is there anything i can do to get more accurate data. I'm displaying the time in fraction of second.

Thanks

@caprica
Copy link
Owner

caprica commented Jul 30, 2012

mediaPlayer.getTime() returns the time as reported by vlc.

There is no way to improve the resolution of the returned time.

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