зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631075 - Clear the event source's metadata when we clear the main controller. r=bryce
When we clear the main controller, which means there is no any media we need to control at that time, we would reset its playback state, but we should clear its metadata as well. Differential Revision: https://phabricator.services.mozilla.com/D71428
This commit is contained in:
Родитель
a7194d3716
Коммит
5a70c0ed78
|
@ -339,6 +339,7 @@ void MediaControlService::ControllerManager::UpdateMainControllerInternal(
|
|||
if (!mMainController) {
|
||||
LOG_MAINCONTROLLER("Clear main controller");
|
||||
mSource->SetPlaybackState(MediaSessionPlaybackState::None);
|
||||
mSource->SetMediaMetadata(MediaMetadataBase::EmptyData());
|
||||
} else {
|
||||
LOG_MAINCONTROLLER("Set controller %" PRId64 " as main controller",
|
||||
mMainController->Id());
|
||||
|
|
|
@ -27,6 +27,8 @@ class MediaMetadataBase {
|
|||
const nsString& aAlbum)
|
||||
: mTitle(aTitle), mArtist(aArtist), mAlbum(aAlbum) {}
|
||||
|
||||
static MediaMetadataBase EmptyData() { return MediaMetadataBase(); }
|
||||
|
||||
nsString mTitle;
|
||||
nsString mArtist;
|
||||
nsString mAlbum;
|
||||
|
|
Загрузка…
Ссылка в новой задаче