Bug 1886057 - Replace ToMediaControlKeyStr by GetEnumString r=media-playback-reviewers,padenot
The `ToMediaControlKeyStr` can be replaced by `GetEnumString` since `GetEnumString` is able to access the enum mapping strings of the `MediaControlKey` generated by the dom binding in `EnumStrings<MediaControlKey>::Values` Differential Revision: https://phabricator.services.mozilla.com/D205006
This commit is contained in:
@@ -454,7 +454,7 @@ class HTMLMediaElement::MediaControlKeyListener final
|
||||
void HandleMediaKey(MediaControlKey aKey) override {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(IsStarted());
|
||||
MEDIACONTROL_LOG("HandleEvent '%s'", ToMediaControlKeyStr(aKey));
|
||||
MEDIACONTROL_LOG("HandleEvent '%s'", GetEnumString(aKey).get());
|
||||
if (aKey == MediaControlKey::Play) {
|
||||
Owner()->Play();
|
||||
} else if (aKey == MediaControlKey::Pause) {
|
||||
|
||||
Reference in New Issue
Block a user