Re: A proposal for solving non-muxed RTCP *and* ICE freezing

FYI, here is what everything would look like for RTP/RTCP non-mux support based on the constructor approach. 

[Constructor(optional RTCIceListener iceListener), 
     Constructor(RTCIceOptions options)]
interface RTCIceTransport {
    readonly    attribute RTCIceListener       iceListener;
    readonly    attribute RTCIceRole           role;
// adding a component attribute makes it possible to determine whether an ICE transport is for RTP or RTCP. 
    readonly    attribute RTCIceComponent      component;
    readonly    attribute RTCIceTransportState state;
    readonly    attribute RTCIceGatheringState iceGatheringState;
    sequence<RTCIceCandidate> getLocalCandidates ();
    sequence<RTCIceCandidate> getRemoteCandidates ();
    void                      gather (RTCIceGatherPolicy gatherPolicy);
    void                      start (RTCIceParameters remoteParameters, optional RTCIceRole role);
    void                      stop ();
    RTCIceParameters          getLocalParameters ();
    RTCIceParameters?         getRemoteParameters ();
    RTCIceTransport           createAssociatedTransport ();
    void                      addRemoteCandidate (RTCIceCandidate remoteCandidate);
    void                      setRemoteCandidates (sequence<RTCIceCandidate> remoteCandidates);
                attribute EventHandler?        onlocalcandidate;
                attribute EventHandler?        onicestatechange;
                attribute EventHandler?        onicegatheringstatechange;
                attribute EventHandler?        onerror;
};

enum RTCIceComponent {
    "RTP",
    "RTCP"
};

[Constructor()]
interface RTCIceTransportController {
    sequence<RTCIceTransport> getTransports ();
    void                      addTransport (RTCIceTransport transport, int index = null);
};

[Constructor(MediaStreamTrack track, RTCDtlsTransport transport, optional RTCDtlsTransport rtcpTransport)]
interface RTCRtpSender {
    readonly    attribute MediaStreamTrack track;
    readonly    attribute RTCDtlsTransport transport;
    readonly    attribute RTCDtlsTransport rtcpTransport;
    void                      setTransport (RTCDtlsTransport transport, optional RTCDtlsTransport rtcpTransport);
    void                      setTrack (MediaStreamTrack track);
    static RTCRtpCapabilities getCapabilities (optional DOMString kind);
    void                      send (RTCRtpParameters parameters);
    void                      stop ();
                attribute EventHandler?    onerror;
};

[Constructor(RTCDtlsTransport transport, optional RTCDtlsTransport rtcpTransport)]
interface RTCRtpReceiver {
    readonly    attribute MediaStreamTrack? track;
    readonly    attribute RTCDtlsTransport  transport;
    readonly    attribute RTCDtlsTransport  rtcpTransport;
    void                      setTransport (RTCDtlsTransport transport, optional RTCDtlsTransport rtcpTransport);
    static RTCRtpCapabilities getCapabilities (optional DOMString kind);
    void                      receive (RTCRtpParameters parameters);
    void                      stop ();
                attribute EventHandler?     onerror;
};

// There are no changes needed to the RTCIceListener.  However, there are some tricky aspects that do need to be explained in the text. 
// For example, if an RTCIceTransport a is constructed from an RTCIceListener and then var b == a.createAssociatedTransport() is called,
// the b.RTCIceListener will point to an (implicitly) created RTCIceListener, not a.RTCIceListener. 

[Constructor(optional RTCIceOptions options)]
interface RTCIceListener {
    RTCIceOptions getOptions ();
    void          setOptions (RTCIceOptions options);
};

Received on Wednesday, 4 June 2014 19:10:41 UTC