Closed Bug 1588840 Opened 5 years ago Closed 5 years ago

Add WPT for HTMLMediaElement ending as its MediaStream becomes inactive/inaudible

Categories

(Core :: WebRTC: Audio/Video, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(3 files)

I don't see WPT for this in the mediacapture-streams suite. We should add some.

This adds four test cases:

  • HTMLVideoElement playing a video track, ending through the track ending.
  • HTMLAudioElement playing an audio and a video track, ending through the audio
    track ending.
  • HTMLVideoElement playing a video track, ending through the track being
    removed.
  • HTMLAudioElement playing an audio track and a video track, ending through the
    audio track being removed.

All test cases test the timing of when the HTMLMediaElement starts reporting
true for its ended attribute, and the timing of the ended event.

This is especially important for media elements playing MediaStreams, since the
streams can be manipulated to end playback of the elements synchronously by
either stopping or removing their tracks.

Depends on D49384

This is blocked on clarifying the details of how a HTMLMediaElement with a MediaStream should fire ended, and when to start returning true for its ended attribute. We already have a spec bug on file for this.

The patches reflect what I think is the right behavior, given the HTMLMediaElement spec and my interpreted intent of the mediacapture-streams spec.

Status: NEW → ASSIGNED
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/28ed0836d698
Add WPT for when HTMLMediaElement with a MediaStream should report and fire ended. r=jib
https://hg.mozilla.org/integration/autoland/rev/0efd3fc716c4
Make ended return true after reaching the event loop's step 1 when playing a MediaStream. r=jib
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/20124 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Upstream PR merged by moz-wptsync-bot
Depends on: 1577505
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: