W3C home > Mailing lists > Public > public-media-capture@w3.org > August 2013

[Bug 21618] MediaStreams with no tracks need to not be Ended

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Aug 2013 15:59:11 +0000
To: public-media-capture@w3.org
Message-ID: <bug-21618-5753-06FQ4kmCCx@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21618

Martin Thomson <martin.thomson@skype.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.thomson@skype.net

--- Comment #2 from Martin Thomson <martin.thomson@skype.net> ---
Seems like a reasonable suggestion.  The alternative is to define the ended
property as a direct synthesis of the current states of all MediaStreamTrack
instances.

e.g.,

Object.defineProperty(MediaStream.prototype, 'ended', {
  get: function() {
    return this.tracks.reduce(function(a, track) {
      return a && track.ended;
    }, true);
  }, 
  enumerable: true,
  configurable: true
});

A consequence of this algorithm is that a MediaStream with no tracks is always
ended.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
Received on Wednesday, 21 August 2013 15:59:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:18 UTC