MediaSession show media controls on Android

This commit is contained in:
Fernando Jiménez Moreno 2019-10-18 12:02:47 +02:00
parent 761f21fc8b
commit dd63ba425f
11 changed files with 183 additions and 26 deletions

View file

@ -1804,9 +1804,15 @@ impl HTMLMediaElement {
PlaybackState::Playing => {
media_session_playback_state = MediaSessionPlaybackState::Playing;
},
PlaybackState::Buffering => {
// Do not send the media session playback state change event
// in this case as a None_ state is expected to clean up the
// session.
return;
},
_ => {},
};
println!(
debug!(
"Sending media session event playback state changed to {:?}",
media_session_playback_state
);