Can not remove a stopped media track using removeTrack on Firefox version 52 onwards

RESOLVED FIXED in Firefox 52

Status

()

defect
P1
normal
Rank:
15
RESOLVED FIXED
3 years ago
5 months ago

People

(Reporter: prerak, Assigned: pehrsons)

Tracking

({regression, testcase})

52 Branch
mozilla53
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox50 unaffected, firefox51 unaffected, firefox52+ fixed, firefox53+ fixed)

Details

Attachments

(2 attachments)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36

Steps to reproduce:

Stop a media tracks from a MediaStream and then remove the stopped track from the MediaStream using removeTrack.
use - https://jsfiddle.net/7octza05/3/ to reproduce the issue


Actual results:

From Firefox 52 and onwards, if the track is stopped before calling replaceTrack(), it is not removed from the MediaStream object. It is working fine on stable (v50) and beta(51).

If I try to remove a track without stopping it the media capture continues to happens, eg I try to remove a video track from the mediaStream without stopping it the camera light does not turn off and capture cont


Expected results:

ReplaceTrack() should remove from media stream even if is is stopped
Summary: Can not remove a stopped media track using removeTrack → Can not remove a stopped media track using removeTrack on Firefox version 52 onwards
Component: Untriaged → Audio/Video: MediaStreamGraph
Keywords: testcase
Product: Firefox → Core
Andreas - perhaps track cloning fallout?
Cloning was earlier. But yeah, some sort of fallout.
Assignee: nobody → pehrson
Rank: 15
Priority: -- → P1
Tracking 53+ for this video regression.
tracking as new regression in 52
So turned out we didn't have a test for this. :/

Anyhow - fallout from Bug 1208316 - MediaStream.active. And thanks for reporting Prerak!
Blocks: 1208316
No longer blocks: 1301675
Status: NEW → ASSIGNED
Comment on attachment 8816201 [details]
Bug 1321235 - Add a mochitest.

https://reviewboard.mozilla.org/r/96966/#review97216
Attachment #8816201 - Flags: review?(rjesup) → review+
Comment on attachment 8816202 [details]
Bug 1321235 - Let ended MediaStreamTracks be removable.

https://reviewboard.mozilla.org/r/96968/#review97218
Attachment #8816202 - Flags: review?(rjesup) → review+
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7f0eb04ee1d5
Add a mochitest. r=jesup
https://hg.mozilla.org/integration/autoland/rev/eea552a9e162
Let ended MediaStreamTracks be removable. r=jesup
https://hg.mozilla.org/mozilla-central/rev/7f0eb04ee1d5
https://hg.mozilla.org/mozilla-central/rev/eea552a9e162
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Andreas, Thanks for fixing it quickly. Will this is be available on Firefox 52 also, as it's there too.
Comment on attachment 8816202 [details]
Bug 1321235 - Let ended MediaStreamTracks be removable.

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1208316
[User impact if declined]: We'd regress a shipped, minor, feature which behavior is clearly speced.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: It's very simple, and has automated test coverage.
[String changes made/needed]: None
Attachment #8816202 - Flags: approval-mozilla-aurora?
Comment on attachment 8816202 [details]
Bug 1321235 - Let ended MediaStreamTracks be removable.

fix new regression in aurora52
Attachment #8816202 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
qe-verify- per Comment 14
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.