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?

Était-ce utile?

La 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);

Autres conseils

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.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top