W3C home > Mailing lists > Public > public-webrtc@w3.org > July 2012

Re: DTMF

From: ᛏᚮᛘᛘᚤ <tommyw@google.com>
Date: Thu, 19 Jul 2012 10:06:31 +0200
Message-ID: <CALLKCfPmMxNKyDaB_tz7Xn9dZrfmh0fKzsmoWrkfeOa-0Vqs3g@mail.gmail.com>
To: Justin Uberti <juberti@google.com>
Cc: public-webrtc@w3.org
OK, so the DTMF string goes into the RTP steam and audio mixing, if any,
will happen on the receiver side. Fine, but I still think that the data
channel could equally well be used for this without complicating the
PeerConnection API with something that just a fraction of users needs.
However I leave this to the list.


>> Secondly, where and how should the type AudioMediaStreamTrack be used?
>> For this to work MediaStream's audioTracks should be a corresponding type
>> AudioMediaStreamTrackList but that implies that
>> LocalMediaStreams acquired from getUserMedia will need to have
>> AudioMediaStreamTracks as well.
>>
>
> I would expect that tracks of type audio would always be
> AudioMediaStreamTracks, regardless of where they came from.
>
>
That would simplify things greatly though but it means that the "Media
Capture and Streams" spec needs to be rewritten and the
AudioMediaStreamTrack definition moved there.

To give an concrete example this needs to be defined:

interface AudioMediaStreamTrack : MediaStreamTrack {
    readonly attribute boolean canInsertDTMF;
    void insertDTMF (DOMString tones, optional long duration);
};

interface AudioMediaStreamTrackList {
    readonly attribute unsigned long length;
    AudioMediaStreamTrack item (unsigned long index);
    void             add (AudioMediaStreamTrack track);
    void             remove (AudioMediaStreamTrack track);
             attribute Function?     onaddtrack;
             attribute Function?     onremovetrack;
};

[Constructor (MediaStreamTrackList? audioTracks, MediaStreamTrackList?
videoTracks)]
interface MediaStream {
    readonly attribute DOMString                 label;
    readonly attribute AudioMediaStreamTrackList audioTracks;
    readonly attribute MediaStreamTrackList      videoTracks;
             attribute boolean                   ended;
             attribute Function?                 onended;
};

Otherwise the specification doesn't make sense and the WebKit
implementation won't work.

/Tommy

-- 
Tommy Widenflycht, Senior Software Engineer
Google Sweden AB, Kungsbron 2, SE-11122 Stockholm, Sweden
Org. nr. 556656-6880
And yes, I have to include the above in every outgoing email according to
EU law.
Received on Thursday, 19 July 2012 08:07:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:28 UTC