зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1580623 - P2: Fire seek{for,back}ward action handler if it's set r=alwu
Depends on D45459 Differential Revision: https://phabricator.services.mozilla.com/D66619 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ce354ff512
Коммит
acef9be28a
|
@ -66,15 +66,19 @@ void PlaybackController::Pause() {
|
|||
}
|
||||
|
||||
void PlaybackController::SeekBackward() {
|
||||
// TODO : use media session's action handler if it exists. MediaSessionAction
|
||||
// doesn't support `seekbackward` yet.
|
||||
return;
|
||||
const MediaSessionAction action = MediaSessionAction::Seekbackward;
|
||||
if (RefPtr<MediaSession> session = GetMediaSession();
|
||||
session && session->IsSupportedAction(action)) {
|
||||
session->NotifyHandler(action);
|
||||
}
|
||||
}
|
||||
|
||||
void PlaybackController::SeekForward() {
|
||||
// TODO : use media session's action handler if it exists. MediaSessionAction
|
||||
// doesn't support `seekforward` yet.
|
||||
return;
|
||||
const MediaSessionAction action = MediaSessionAction::Seekforward;
|
||||
if (RefPtr<MediaSession> session = GetMediaSession();
|
||||
session && session->IsSupportedAction(action)) {
|
||||
session->NotifyHandler(action);
|
||||
}
|
||||
}
|
||||
|
||||
void PlaybackController::PreviousTrack() {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
const gMediaSessionActions = [
|
||||
"play",
|
||||
"pause",
|
||||
"seekbackward",
|
||||
"seekforward",
|
||||
"previoustrack",
|
||||
"nexttrack",
|
||||
"stop",
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
const MediaSessionActions = [
|
||||
"play",
|
||||
"pause",
|
||||
"seekbackward",
|
||||
"seekforward",
|
||||
"previoustrack",
|
||||
"nexttrack",
|
||||
"stop",
|
||||
|
|
Загрузка…
Ссылка в новой задаче