Hi all, 

Use Case: 
1. MediaStream will be used to represent TV broadcasting stream. 
2. Then there are multiple MediaStreamTrack to represent multiple audio/video 
tracks in TV stream. 
3. Web content will put this MediaStream into video tag to play the TV content. 
4. Web content can check or select different audio languages or visual angles 
from video tag's multitracks API. 
5. This introduced that MediaStreamTrack needs to relay enough information to 
construct Audio/VideoTrack. 

After discussing with Shelly offline, 
we think that both of Constraints and MediaStreamTrack::lable are not suitable 
to append extra information from AudioTrack::kind/languange. 
And according to these extra info doesn't expose to Web Content, we can just 
create new member variables in class MediaStreamTrack to record them. 
Then finally mapping these new variables from MediaStreamTrack to AudioTrack. 

Appreciate for any suggestion. 
Thanks, 
Sincerely yours. 
----- 原始郵件 -----

寄件者: "Shelly Lin" <[email protected]> 
收件者: [email protected] 
寄件備份: 2014 4 月 16 星期三 下午 4:11:58 
主旨: Mapping AudioStreamTrack to AudioTrack 

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. 


Cheers, 
Shelly 
_______________________________________________ 
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

Reply via email to