- From: aboba via GitHub <sysbot+gh@w3.org>
- Date: Wed, 16 Mar 2016 22:15:57 +0000
- To: public-ortc@w3.org
aboba has just created a new issue for
https://github.com/openpeer/ortc:
== Methods that can return null (and attributes that can be null) ==
Throughout the specification, there appear to be issues with methods
that can return null or attributes that can be null. For example:
1. If getLocalCandidates() is called before gather() had been called,
there are no local candidates. So can getLocalCandidates() return
null?
sequence<RTCIceCandidate>? getLocalCandidates ();
2. gather() takes an optional RTCIceGatherOptions argument. Should
that argument also be nullable?
void gather (optional RTCIceGatherOptions?
options);
3. In the RTCIceTransport constructor, the RTCIceGatherer argument is
optional, but not nullable. Should it also be nullable?
[ Constructor (optional RTCIceGatherer? gatherer)]
Note that the iceGatherer attribute is nullable:
readonly attribute RTCIceGatherer? iceGatherer;
4. Can getRemoteCandidates() return null if there aren't any remote
candidates yet?
sequence<RTCIceCandidate>? getRemoteCandidates ();
5. In RTCIceTransport.start(), should the ICE role be nullable as well
as optional?
void start (RTCIceGatherer gatherer,
RTCIceParameters remoteParameters, optional RTCIceRole? role);
6. In getRemoteCertificates(), what if the remote certificates aren't
available yet? Can getRemoteCandidates return null?
sequence<ArrayBuffer>? getRemoteCertificates ();
7. Should RTCDtlsTransportState be nullable in
RTCDtlsTransportStateChangedEventInit?
dictionary RTCDtlsTransportStateChangedEventInit : EventInit {
RTCDtlsTransportState? state;
};
If so, why isn't it nullable in the interface?
[ Constructor (DOMString type, RTCDtlsTransportStateChangedEventInit
eventInitDict)]
interface RTCDtlsTransportStateChangedEvent : Event {
readonly attribute RTCDtlsTransportState? state;
};
8. In the RtpSender, what if an rtcpTransport isn't provided? Should
rtcpTransport be nullable in the constructor as well as optional?
Should the rtcpTransport attribute be nullable?
[ Constructor (MediaStreamTrack track, RTCDtlsTransport transport,
optional RTCDtlsTransport? rtcpTransport)]
partial interface RTCRtpSender : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
void setTransport (RTCDtlsTransport
transport, optional RTCDtlsTransport? rtcpTransport);
};
9. Similar questions for the RTCRtpReceiver:
[ Constructor (DOMString kind, RTCDtlsTransport transport, optional
RTCDtlsTransport? rtcpTransport)]
partial interface RTCRtpReceiver : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
void setTransport (RTCDtlsTransport
transport, optional RTCDtlsTransport? rtcpTransport);
static RTCRtpCapabilities getCapabilities (optional
DOMString? kind);
};
10. The RTCIceTransportController
What if there aren't any ICE transports added yet? can
getTransports() return null? Should the optional constructor argument
also be nullable?
[Constructor()]
void addTransport (RTCIceTransport transport,
optional unsigned long? index);
sequence<RTCIceTransport>? getTransports ();
};
Please view or discuss this issue at
https://github.com/openpeer/ortc/issues/433 using your GitHub account
Received on Wednesday, 16 March 2016 22:15:59 UTC