Backed out 2 changesets (bug 1420488) for eslint failures in toolkit/content/tests/browser/browser_autoplay_policy_play_twice.js. r=backout
Backed out changeset 92bd0fcb67d5 (bug 1420488) Backed out changeset 0f211029517c (bug 1420488)
This commit is contained in:
@@ -1979,12 +1979,12 @@ void HTMLMediaElement::DoLoad()
|
||||
return;
|
||||
}
|
||||
|
||||
// Detect if user has interacted with element so that play will not be
|
||||
// blocked when initiated by a script. This enables sites to capture user
|
||||
// intent to play by calling load() in the click handler of a "catalog
|
||||
// view" of a gallery of videos.
|
||||
if (EventStateManager::IsHandlingUserInput()) {
|
||||
// Detect if user has interacted with element so that play will not be
|
||||
// blocked when initiated by a script. This enables sites to capture user
|
||||
// intent to play by calling load() in the click handler of a "catalog
|
||||
// view" of a gallery of videos.
|
||||
mIsBlessed = true;
|
||||
mHasUserInteractedLoadOrSeek = true;
|
||||
// Mark the channel as urgent-start when autopaly so that it will play the
|
||||
// media from src after loading enough resource.
|
||||
if (HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) {
|
||||
@@ -2757,7 +2757,7 @@ HTMLMediaElement::Seek(double aTime,
|
||||
// Detect if user has interacted with element by seeking so that
|
||||
// play will not be blocked when initiated by a script.
|
||||
if (EventStateManager::IsHandlingUserInput()) {
|
||||
mIsBlessed = true;
|
||||
mHasUserInteractedLoadOrSeek = true;
|
||||
}
|
||||
|
||||
StopSuspendingAfterFirstFrame();
|
||||
@@ -4043,6 +4043,7 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
|
||||
mIsEncrypted(false),
|
||||
mWaitingForKey(NOT_WAITING_FOR_KEY),
|
||||
mDisableVideo(false),
|
||||
mHasUserInteractedLoadOrSeek(false),
|
||||
mFirstFrameLoaded(false),
|
||||
mDefaultPlaybackStartPosition(0.0),
|
||||
mHasSuspendTaint(false),
|
||||
@@ -4285,9 +4286,6 @@ HTMLMediaElement::PlayInternal(ErrorResult& aRv)
|
||||
UpdatePreloadAction();
|
||||
UpdateSrcMediaStreamPlaying();
|
||||
|
||||
// once media start playing, we would always allow it to autoplay
|
||||
mIsBlessed = true;
|
||||
|
||||
// TODO: If the playback has ended, then the user agent must set
|
||||
// seek to the effective start.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user