These events are not implemented yet, see [1] for the current implementation status of MediaStream and [2] for MediaStreamTrack.
If the stream is played in a media element, you can listen for the media element's "ended" event, and check its "ended" property. Like in [3]. [1] https://dxr.mozilla.org/mozilla-central/source/dom/webidl/MediaStream.webidl [2] https://dxr.mozilla.org/mozilla-central/source/dom/webidl/MediaStreamTrack.webidl [3] http://jsfiddle.net/pehrsons/ghsqjcsk/ - Andreas On Wed, Aug 19, 2015 at 2:19 PM, Balwant Bisht <[email protected]> wrote: > I am trying to handle a case where user stop stream from firefox dialog. I tried handling event MediaStreamTrack.oneended and also tried checking MediaStreamTrack.readyState but none worked > > Is there any way to check current stream state i.e. it is live or ended? > > Is there any event which get called when stream or track state changes? > > _______________________________________________ > dev-media mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-media _______________________________________________ dev-media mailing list [email protected] https://lists.mozilla.org/listinfo/dev-media

