Bug 1654277 - part2 : pause playing media but stop already paused media when receiving 'pause'. r=chunmin
We want to modify our current behavior from "resuming all media" to "resuming latest paused media" when pressing `play` media key. The reason of doing that is because that give us better user experience, espeically on Facebook. Chrome has been taking this approach, so we want to follow this strategy. The test in D84879 can help to understand this scenario. Differential Revision: https://phabricator.services.mozilla.com/D85118
This commit is contained in:
@@ -449,6 +449,10 @@ class HTMLMediaElement::MediaControlKeyListener final
|
||||
|
||||
bool IsStarted() const { return mState != MediaPlaybackState::eStopped; }
|
||||
|
||||
bool IsPlaying() const override {
|
||||
return Owner() ? !Owner()->Paused() : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Following methods should only be used after starting listener.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user