Closed Bug 1045810 Opened 10 years ago Closed 8 years ago

MediaStream(Track) onended is not triggered when user stops sharing screen

Categories

(Core :: WebRTC, defect, P2)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1208373

People

(Reporter: philipp+bugzilla, Unassigned)

References

(Depends on 1 open bug, )

Details

(Whiteboard: [spec])

https://bugzilla.mozilla.org/show_bug.cgi?id=983504 is works great, but it seems that there is no notification if a) the user stops sharing a window/screen b) the user closes a shared window Chrome triggers the streams .onended in that case. Note that chrome might no longer be be compliant with the getusermedia spec. Which seems to have moved to the tracks .onended. Neither seems to be called in the cases mentioned above. See URL, standard GUM test with a minor modification in https://github.com/fippo/webrtc-landing/commit/35da319f395fcef40b7938d4ee7b0f4b1b59d373
Note we don't yet support onended for any stream.
Depends on: 910249
an ugly workaround is to poll the streams currentTime attribute and trigger a .onended if this doesn't advance anymore.
(In reply to Philipp Hancke from comment #2) > an ugly workaround is to poll the streams currentTime attribute and trigger > a .onended if this doesn't advance anymore. I can't get this to work if I request the microphone at the same time I capture the desktop. The currentTime property continues to increase after I stop sharing. Also getVideoTracks continues to return the video stream (that has now stopped) so I can't even check the length of the video track array periodically. Do you have another workaround I can try ;)
backlog: --- → webRTC+
Rank: 28
Priority: -- → P2
Whiteboard: [spec]
Fixed in bug 1208373.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.