Вопрос

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?

Это было полезно?

Решение

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

Другие советы

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.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top