On Wed, Apr 16, 2014 at 8:11 PM, Shelly Lin <[email protected]> wrote:

> Hi everyone,
>
> I've picked up the implementation of bug 744896 to support multi-tracks
> media sources from DTV.
> https://bugzilla.mozilla.org/show_bug.cgi?id=744896
>
> Although the Tuner API is till in draft, it is pretty solid that the
> source of a tuner would be MediaStream.
> http://airpingu.github.io/tv-tuner-api/index.html#idl-def-TVTuner
>
> The problem is that the mapping of AudioStreamTrack to AudioTrack is not
> one-on-one, for example:
>
> An audio track has:
> interface AudioTrack {
>   readonly attribute DOMString id;
>   readonly attribute DOMString kind;
>     --> "alternative", "descriptions", "main"
>   readonly attribute DOMString label;
>     --> more like free string for users(resource) to define
>   readonly attribute DOMString language;
>     --> "eng", "fra"
>            attribute boolean enabled;
> };
> For AudioTrack.kind()
> http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-kind
> For AudioTrack.language()
> http://www.w3.org/TR/html5/embedded-content-0.html#dom-audiotrack-language
>
> An audio stream track has:
> interface MediaStreamTrack : EventTarget {
>     readonly attribute DOMString kind;
>       --> "audio" or "video"
>     readonly attribute DOMString id;
>     readonly attribute DOMString label;
>       --> Same as the label in audio track
>              attribute boolean enabled;
>     readonly attribute boolean muted;
>
> Should I use Constraints to setup the information when constructing a
> stream track?
>
> http://dev.w3.org/2011/webrtc/editor/getusermedia.html#tracks-and-constraints
>
> Or, if this mapping will not reveal to js anyway, is it okay to just
> implement the mapping internally? Say the label attribute of
> MediaStreamTrack contains a field of "kind" and a field of "language", so
> that we can parse them out at constructing an audio track from media stream.
>

I think it would be a good idea to align AudioTrack/VideoTrack and
MediaStreamTrack by changing their specs.

I think the best thing to do would be to change MediaStreamTrack to fit
AudioTrack/VideoTrack. E.g. we could change MediatStreamTrack.kind to
"type" (and add it to AudioTrack/VideoTrack), and add "kind" and "language"
to MediaStreamTrack.

Martin, what do you think?

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to