- From: Kevin Dempsey <kevindempsey70@gmail.com>
- Date: Fri, 18 Oct 2013 09:50:00 +0100
- To: public-media-capture@w3.org
- Message-ID: <CAMvTgcekFhW4wRn_7P2_svmAC-oSqKM26qubDH3c14ayv4iZnw@mail.gmail.com>
In earlier versions of the gUM spec, the stream created by a getUserMedia() call had a stop() method that ended all the tracks, reduced the reference count on the track sources and if that reference count reached zero, the source was stopped (and recommended that any 'on-air' indicator was removed). In recent versions of the spec the stream doesn't have a stop() method, but MediaStreamTrack does. However, this stop() method stops the source regardless of whether any other track is using that source. I know that the 'best practices' section recommends that sources should not be shared but the MediaStreamTrack stop() function's "kill switch" behaviour forces that upon implementors. So under the current spec, the release the stream created by getUserMedia() you have to call stop on all tracks it has (one audio and one video maximum). This will also kill the sources and therefore end any track also using those sources. Can we also have the earlier behaviour in a function on the returned stream (perhaps not called stop() to reduce possible confusion)?
Received on Friday, 18 October 2013 09:53:16 UTC