Closed Bug 1825307 Opened 1 year ago Closed 1 year ago

Media should not flow for a video track with enabled=false

Categories

(Core :: WebRTC: Audio/Video, defect, P2)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(2 files)

Spec:

The enabled/disabled state is under application control and determines whether the track outputs media (to its consumers). Hence, media from the source only flows when a MediaStreamTrack object is both unmuted and enabled.

Currently however, a video MediaStreamTrack that is rendered in a HTMLVideoElement and has enabled = false will on source resolution change cause a resize event and a change of intrinsic video dimensions in the video element. The change intrinsic dimensions will also be observable through drawing the video element to a CanvasRenderingContext2D (through drawImage(video, 0, 0)).

Without this patch, if the video source changes resolution, this would be
reflected in a HTMLVideoElement rendering the track, even though the track is
disabled. Such resizes would be observable both through resize events on the
video element, through the videoWidth and videoHeight attributes, and by
drawing the video element to a CanvasRenderingContext2D.

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/245bd0a2f594
Add wpt testcase. r=padenot
https://hg.mozilla.org/integration/autoland/rev/f3cf1fe55e62
Do not render consecutive black frames when a video track is disabled. r=padenot
Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Hi James, could you take a look at the wpt sync issue here?

This landed in the same stack as bug 1807215 and both bugs touched the same file in wpt. I guess that's where the merge conflict came from.

Flags: needinfo?(james)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39481 for changes under testing/web-platform/tests
Flags: needinfo?(james)
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: