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
Implement mediasession set positon state #24885
Changes from 1 commit
274d4d2
3e83b0b
8bdee36
e268193
4d215c9
41ff93e
File filter...
Jump to…
extended android jni with onMediaSessionSetPositionState
- Loading branch information
| @@ -255,4 +255,15 @@ public void onMediaSessionPlaybackStateChange(int state) { | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| @Override | ||
| public void onMediaSessionSetPositionState(float duration, float position, float playbackRate) { | ||
| Log.d("onMediaSessionSetPositionState", duration + " " + position + " " + playbackRate); | ||
| if (mMediaSession == null) { | ||
| mMediaSession = new MediaSession(mServoView, this, getApplicationContext()); | ||
| } | ||
|
|
||
| mMediaSession.setPositionState(duration, position, playbackRate); | ||
|
This conversation was marked as resolved
by ferjm
ferjm
Member
|
||
| return; | ||
| } | ||
| } | ||
I have a wrong implementation.(Because setPositionState is not implemented in MediaSession.java.)
Should I call
onMediaSessionSetPositionStateofServo.javadirectly here?Or is it better to implement
setPositionStateinMediaSession.javaand call it there?