W3C home > Mailing lists > Public > public-media-capture@w3.org > April 2014

Re: [Bug 25275] VideoTrackList.selectedIndex initialization confilicts with HTML5 spec, "if no track is selected".

From: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Date: Wed, 16 Apr 2014 05:42:01 +0000
To: "kiran.guduru@samsung.com" <kiran.guduru@samsung.com>, Steev James <steev.a.james@gmail.com>
CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <1447FA0C20ED5147A1AA0EF02890A64B1CFD61A5@ESESSMB209.ericsson.se>
On 16/04/14 06:03, Kiran Kumar Guduru wrote:

Some more comments regarding relation between "live" and "muted" state of a MediaStreamTrack.

This has been discussed earlier in [1] and concluded that "muted" and "disabled" tracks should be considered as "live".



[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=22259


OK, so we should be able to use "live".



------- Original Message -------

Sender : Kiran Kumar Guduru<kiran.guduru@samsung.com><mailto:kiran.guduru@samsung.com> Lead Engineer/SRI-Bangalore-TZN/Samsung Electronics

Date : Apr 16, 2014 12:32 (GMT+09:00)

Title : Re: Re: [Bug 25275] VideoTrackList.selectedIndex initialization confilicts with HTML5 spec, "if no track is selected".



Yes It is done by modifying the statement.

I agree that the relation between 'live' and 'muted' is not defined in the spec. Since muted is not present in the readyState of the MediaStreamTrack, I thought that "muted" and "disabled" are part of "live" state only.





------- Original Message -------

Sender : Stefan Håkansson LK<stefan.lk.hakansson@ericsson.com><mailto:stefan.lk.hakansson@ericsson.com>

Date : Apr 15, 2014 22:12 (GMT+09:00)

Title : Re: [Bug 25275] VideoTrackList.selectedIndex initialization confilicts with HTML5 spec, "if no track is selected".



On 2014-04-15 14:36, Kiran Kumar Guduru wrote:
> +1 for "not take the muted/disabled of the MediaStreamTrack into account".
>
> I would like to polish this "just select one of the video tracks
> regardless of it being muted/disabled or not" with
>
> "First available MediaStreamTrack with MediaStreamTrack.readyState
> "live", (Since live includes muted and disabled), If no such track
> available set it to -1.

This would work for me. That would mean that we replace the sentences

"Set the VideoTrackList.selectedIndex to the index of the first
VideoTrack, in the VideoTrackList, that corresponds to a
MediaStreamTrack that is not muted or disabled. If no such VideoTrack
exists, set the selectedIndex attribute to 0."

with

"Set the VideoTrackList.selectedIndex to the index of the first
VideoTrack, in the VideoTrackList, that corresponds to a
MediaStreamTrack that has readyState 'live'. If no such VideoTrack
exists, set the selectedIndex attribute to -1."

and we're done?

(The caveat seem to be that the relation between 'live' and 'muted' is
not defined.)

>
> ------- *Original Message* -------
>
> *Sender* : Stefan Håkansson LK
>
> *Date* : Apr 15, 2014 20:20 (GMT+09:00)
>
> *Title* : Re: [Bug 25275] VideoTrackList.selectedIndex initialization
> confilicts with HTML5 spec, "if no track is selected".
>
> On 2014-04-15 11:33, Kiran Kumar Guduru wrote:
>  > It is true that MediaElement spec is not specifying anything about
>  > initialization of selectedIndex.
>  >
>  > In MediaStreams spec, we will come across this scenario, "if no track is
>  > selected", after removing the selected track from VideoTracks (and when
>  > not selecting any other tracks in the list).
>
> Re-reading the html draft, I get to the following understanding:
>
> * For audio, any new tracks (tracks that are added to a MediaStream that
> is being played in a media element) gets status disabled in the media
> element's AduioTrackList. I.e. the application has to enable them
> (enabled=true) to have their audio played (mixed in with the other audio
> tracks).
> * For video, any new track (tracks that are added to a MediaStream that
> is being played in a media element) gets status not-selected in the
> media element's VideoTrackList. I.e. the application has to select it
> (selected=true) to have its video played.
> * For audio, removing a track does not affect the remaining tracks
> (their enabled property in the AudioTrack of the AudioTrackList of the
> media element remains).
> * For video, removing a track does not affect the remaining ones,
> meaning that if the track being removed is the currently selected one,
> then no track will be selected after removal (and selectIndex of the
> media elements VideoTrackList will return -1).
>
> I think there are no ambiguities so far.
>
> The only outstanding thing would be the resource fetch phase. The text says
>
> "If either the media resource [...] indicate a particular set of audio
> or video tracks to enable, or if the user agent has information that
> enabled it to select specific tracks for optimal performance, then the
> selected audio tracks must be enabled in the element's audioTracks
> object, and, of the selected video tracks, the one that is listed first
> in the element's videoTracks object must be selected."
>
> What this means for a MediaStream is up to this group to define. What is
> currently said is that for all MediaStreamTracks of kind audio, the
> media element's corresponding AudioTrack should be initialised to
> "enabled" (and not take the enabled attribute of the corresponding
> MediaStreamTrack into account).
>
> For video, it is said: "Set the VideoTrackList.selectedIndex to the
> index of the first VideoTrack, in the VideoTrackList, that corresponds
> to a MediaStreamTrack that is not muted or disabled. If no such
> VideoTrack exists, set the selectedIndex attribute to 0." I think '0'
> should be changed to '-1', but otherwise this is quite clear IMO. We
> could consider simplifying by not take the muted/disabled of the
> MediaStreamTrack into account, and just select one of the video tracks
> regardless of it being muted/disabled or not.
>
> Stefan
>
>
>
>  >
>  > ------- *Original Message* -------
>  >
>  > *Sender* : Steev James
>  >
>  > *Date* : Apr 14, 2014 22:24 (GMT+09:00)
>  >
>  > *Title* : Re: [Bug 25275] VideoTrackList.selectedIndex initialization
>  > confilicts with HTML5 spec, "if no track is selected".
>  >
>  > Hmm,
>  > My reay intention is "if none of the tracks are selected" has no room in
>  > MediaStreams spec.
>  >
>  >
>  > On Mon, Apr 14, 2014 at 6:15 PM, Stefan Håkansson LK
>  > > > wrote:
>  >
>  >     On 2014-04-14 14:15, Steev James wrote:
>  >      > Stefan,
>  >      > This link is just specifying that AudioTracks / VideoTracks
> can have
>  >      > multiple tracks and,
>  >      > "The|VideoTrackList.selectedIndex|attribute must return the index
>  >     of the
>  >      > currently selected track, if any. If the|VideoTrackList
>  >      >
>  > |object
>  >      > does not currently represent any tracks, or if none of the
> tracks are
>  >      > selected, it must instead return −1."
>  >
>  >     Hm, we must be talking past each other. I read your comment
>  >     'MediaElement spec has not mentioned anything about "how" to select a
>  >     track.', and responded to it because I think that is precisely
> what you
>  >     _can_ do with the enabled (audio) and selected (video) attributes.
>  >
>  >      >
>  >      >
>  >      > It is not mandating the default initialization to first track. But
>  >      > MediaStreams is mandating it to initialize it to '0' track of the
>  >     list.
>  >      > So "if none of the tracks are selected" has no room in
>  >     MediaStreams spec.
>  >      >
>  >      >
>  >      >
>  >      > On Mon, Apr 14, 2014 at 5:02 PM, Stefan Håkansson LK
>  >      > >
>  >      > > >> wrote:
>  >      >
>  >      >     On 2014-04-14 08:58, bugzilla@jessica.w3.org<mailto:bugzilla@jessica.w3.org>
>  >
>  >      > > > wrote:
>  >      >      > https://www.w3.org/Bugs/Public/show_bug.cgi?id=25275

>  >      >      >
>  >      >      > steev > > >>
>  >      >     changed:
>  >      >      >
>  >      >      >             What    |Removed                     |Added
>  >      >      >
>  >      >
>  >
> ----------------------------------------------------------------------------
>  >      >      >                   CC|
>  >      >       |steev.a.james@gmail.com<mailto:steev.a.james@gmail.com>
>  > >
>  >      >      >
>  >      >      > --- Comment #5 from steev >
>  >      > > >> ---
>  >      >      > MediaElement spec has not mentioned anything about "how" to
>  >      >     select a track.
>  >      >
>  >      >
>  >
> http://www.w3.org/TR/html5/embedded-content-0.html#media-resources-with-multiple-media-tracks

>  >      >     details this.
>  >      >
>  >      >      > Is
>  >      >      > there any special interst for specifying this in media
>  >     streams spec?
>  >      >      >
>  >      >
>  >      >
>  >      >
>  >
>  >
>
















[X]




Received on Wednesday, 16 April 2014 05:42:27 UTC

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