Re: [Bug 22212] New: Initial value of the enabled attribute on MediaStreamTrack

On 05/30/2013 03:25 PM, bugzilla@jessica.w3.org wrote:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=22212
>
>              Bug ID: 22212
>             Summary: Initial value of the enabled attribute on
>                      MediaStreamTrack
>      Classification: Unclassified
>             Product: WebRTC Working Group
>             Version: unspecified
>            Hardware: PC
>                  OS: Linux
>              Status: NEW
>            Severity: normal
>            Priority: P2
>           Component: Media Capture and Streams
>            Assignee: public-media-capture@w3.org
>            Reporter: dom@w3.org
>                  CC: public-media-capture@w3.org
>
> The spec doesn't describe what is the initial value of the enabled attribute on
> a MediaStreamTrack.
>
> I assume it should be true.
>
Discussion on the list....

My immediate thinking is that the .clone operator should copy the 
enabled state of the source.
Apart from that case, I think the enabled attribute should be true when 
a stream is created.

The case where it makes a difference:

var video1 = <video tag>
var video2 = <video tag>

var videotrack = ...
var audiotrack = ....

var stream1 = new MediaStream([videotrack, audiotrack])
video1.srcObject = stream1
audiotrack.enabled = false  // affects track inside stream1

var stream2 = stream1.clone()
video2.srcObject = stream2

If enabled is true after clone, video2 will play sound - despite being a 
clone, it will behave differently than stream1, even though nothing has 
been done to change it.

I think it's better that it be copied over.

Received on Tuesday, 18 June 2013 14:01:42 UTC