Question

So, I am trying to set up video controls on Android, when I now try to seek to 0:10 on my Chromecast using mMediaControl.seek(10,null); it seeks always to 0:00.

However the Logcat shows that the seeking was successfull.

Is this a generall SDK Bug or is it my fault?

Was it helpful?

Solution

The Android Connect SDK uses milliseconds when seeking. So you have the right call. Just convert it.

mMediaControl.seek(10000, null);

Or if you want to keep it in seconds.

float mTimeInSeconds = 10.0;
mMediaControl.seek((long) (mTimeInSeconds * 1000), null);

OTHER TIPS

Shouldn't that be:

mMediaControl.seek(<yourmApiClient>,10000);

GOO doc on RemoteMediaPlayer

seek(GoogleApiClient apiClient, long position)
Seeks to a new position within the current media item.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top