Skip to content

Methods that can return empty lists (and nullable attributes) #433

@aboba

Description

@aboba

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 should getLocalCandidates() return an empty list?
  2. What does getRemoteCandidates() return if there aren't any remote candidates yet? An empty list?
  3. In getRemoteCertificates(), what if the remote certificates aren't available yet? Can getRemoteCandidates return an empty list?
  4. Why is RTCDtlsTransportState nullable in RTCDtlsTransportStateChangedEventInit?
    dictionary RTCDtlsTransportStateChangedEventInit : EventInit {
    RTCDtlsTransportState? state;
    };
  5. In the RtpSender, what if an rtcpTransport isn't provided? Shouldn't the rtcpTransport attribute be nullable?

partial interface RTCRtpSender : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
};

  1. In the RtpReceiver, what if an rtcpTransport isn't provided? Shouldn't the rtcpTransport attribute be nullable?

partial interface RTCRtpReceiver : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
};

  1. The RTCIceTransportController
    What if there aren't any ICE transports added yet? Does getTransports() return an empty list?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions