Bug 1554699 - The loop attribute should not have any effect on a media element playing a MediaStream. r=jib

Differential Revision: https://phabricator.services.mozilla.com/D33655
This commit is contained in:
Andreas Pehrson
2019-06-12 08:50:57 +00:00
parent d8b62c86e4
commit f95f381343
2 changed files with 41 additions and 5 deletions

View File

@@ -5106,11 +5106,14 @@ void HTMLMediaElement::PlaybackEnded() {
("%p, got duration by reaching the end of the resource", this));
mSrcStreamPlaybackEnded = true;
DispatchAsyncEvent(NS_LITERAL_STRING("durationchange"));
}
if (HasAttr(kNameSpaceID_None, nsGkAtoms::loop)) {
SetCurrentTime(0);
return;
} else {
// mediacapture-main:
// Setting the loop attribute has no effect since a MediaStream has no
// defined end and therefore cannot be looped.
if (HasAttr(kNameSpaceID_None, nsGkAtoms::loop)) {
SetCurrentTime(0);
return;
}
}
FireTimeUpdate(false);