werift 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +182 -8
- package/THIRD_PARTY_LICENSES_LIBWEBRTC.txt +58 -0
- package/lib/common/src/binary.d.ts +1 -3
- package/lib/common/src/binary.js +8 -6
- package/lib/common/src/binary.js.map +1 -1
- package/lib/common/src/binaryData.js +2 -1
- package/lib/common/src/binaryData.js.map +1 -1
- package/lib/common/src/event.d.ts +26 -0
- package/lib/common/src/event.js +87 -2
- package/lib/common/src/event.js.map +1 -1
- package/lib/common/src/log.js +5 -7
- package/lib/common/src/log.js.map +1 -1
- package/lib/common/src/network.d.ts +6 -1
- package/lib/common/src/network.js +8 -2
- package/lib/common/src/network.js.map +1 -1
- package/lib/common/src/transport.d.ts +12 -5
- package/lib/common/src/transport.js +13 -7
- package/lib/common/src/transport.js.map +1 -1
- package/lib/dtls/src/alert.d.ts +49 -0
- package/lib/dtls/src/alert.js +103 -0
- package/lib/dtls/src/alert.js.map +1 -0
- package/lib/dtls/src/client.js +15 -1
- package/lib/dtls/src/client.js.map +1 -1
- package/lib/dtls/src/context/cipher.d.ts +1 -1
- package/lib/dtls/src/context/cipher.js +6 -3
- package/lib/dtls/src/context/cipher.js.map +1 -1
- package/lib/dtls/src/context/dtls.d.ts +2 -0
- package/lib/dtls/src/context/dtls.js +11 -2
- package/lib/dtls/src/context/dtls.js.map +1 -1
- package/lib/dtls/src/context/transport.d.ts +17 -1
- package/lib/dtls/src/context/transport.js +40 -3
- package/lib/dtls/src/context/transport.js.map +1 -1
- package/lib/dtls/src/flight/client/flight1.js +2 -1
- package/lib/dtls/src/flight/client/flight1.js.map +1 -1
- package/lib/dtls/src/flight/client/flight5.js +8 -3
- package/lib/dtls/src/flight/client/flight5.js.map +1 -1
- package/lib/dtls/src/flight/flight.d.ts +6 -1
- package/lib/dtls/src/flight/flight.js +18 -5
- package/lib/dtls/src/flight/flight.js.map +1 -1
- package/lib/dtls/src/flight/server/flight4.js +4 -2
- package/lib/dtls/src/flight/server/flight4.js.map +1 -1
- package/lib/dtls/src/flight/server/flight6.js +6 -2
- package/lib/dtls/src/flight/server/flight6.js.map +1 -1
- package/lib/dtls/src/handshake/const.d.ts +17 -13
- package/lib/dtls/src/handshake/const.js +16 -14
- package/lib/dtls/src/handshake/const.js.map +1 -1
- package/lib/dtls/src/handshake/message/alert.js +4 -2
- package/lib/dtls/src/handshake/message/alert.js.map +1 -1
- package/lib/dtls/src/handshake/message/certificate.js +2 -1
- package/lib/dtls/src/handshake/message/certificate.js.map +1 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js +2 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.js +4 -2
- package/lib/dtls/src/handshake/message/client/certificateVerify.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/hello.js +14 -7
- package/lib/dtls/src/handshake/message/client/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js +2 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/message/finished.js +2 -1
- package/lib/dtls/src/handshake/message/finished.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.js +6 -3
- package/lib/dtls/src/handshake/message/server/certificateRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/hello.js +12 -6
- package/lib/dtls/src/handshake/message/server/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloDone.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js +4 -2
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/keyExchange.js +16 -8
- package/lib/dtls/src/handshake/message/server/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/random.d.ts +2 -2
- package/lib/dtls/src/handshake/random.js +5 -2
- package/lib/dtls/src/handshake/random.js.map +1 -1
- package/lib/dtls/src/index.d.ts +3 -1
- package/lib/dtls/src/index.js +10 -1
- package/lib/dtls/src/index.js.map +1 -1
- package/lib/dtls/src/record/const.d.ts +52 -33
- package/lib/dtls/src/record/const.js +51 -36
- package/lib/dtls/src/record/const.js.map +1 -1
- package/lib/dtls/src/record/message/fragment.js +12 -6
- package/lib/dtls/src/record/message/fragment.js.map +1 -1
- package/lib/dtls/src/record/message/header.js +10 -5
- package/lib/dtls/src/record/message/header.js.map +1 -1
- package/lib/dtls/src/record/message/plaintext.js +4 -2
- package/lib/dtls/src/record/message/plaintext.js.map +1 -1
- package/lib/dtls/src/record/receive.d.ts +6 -0
- package/lib/dtls/src/record/receive.js +50 -19
- package/lib/dtls/src/record/receive.js.map +1 -1
- package/lib/dtls/src/server.js +19 -1
- package/lib/dtls/src/server.js.map +1 -1
- package/lib/dtls/src/socket.d.ts +134 -2
- package/lib/dtls/src/socket.js +326 -8
- package/lib/dtls/src/socket.js.map +1 -1
- package/lib/ice/src/candidate.d.ts +1 -1
- package/lib/ice/src/candidate.js +24 -12
- package/lib/ice/src/candidate.js.map +1 -1
- package/lib/ice/src/candidateError.d.ts +155 -0
- package/lib/ice/src/candidateError.js +246 -0
- package/lib/ice/src/candidateError.js.map +1 -0
- package/lib/ice/src/candidateGatherer.d.ts +127 -0
- package/lib/ice/src/candidateGatherer.js +745 -0
- package/lib/ice/src/candidateGatherer.js.map +1 -0
- package/lib/ice/src/consent.d.ts +49 -0
- package/lib/ice/src/consent.js +258 -0
- package/lib/ice/src/consent.js.map +1 -0
- package/lib/ice/src/dns/lookup.d.ts +10 -1
- package/lib/ice/src/dns/lookup.js +42 -7
- package/lib/ice/src/dns/lookup.js.map +1 -1
- package/lib/ice/src/exceptions.d.ts +21 -5
- package/lib/ice/src/exceptions.js +58 -13
- package/lib/ice/src/exceptions.js.map +1 -1
- package/lib/ice/src/ice.d.ts +254 -58
- package/lib/ice/src/ice.js +979 -945
- package/lib/ice/src/ice.js.map +1 -1
- package/lib/ice/src/iceBase.d.ts +328 -14
- package/lib/ice/src/iceBase.js +254 -38
- package/lib/ice/src/iceBase.js.map +1 -1
- package/lib/ice/src/index.d.ts +1 -0
- package/lib/ice/src/index.js +1 -0
- package/lib/ice/src/index.js.map +1 -1
- package/lib/ice/src/internal/checkMessages.d.ts +41 -0
- package/lib/ice/src/internal/checkMessages.js +63 -0
- package/lib/ice/src/internal/checkMessages.js.map +1 -0
- package/lib/ice/src/internal/defaultRoute.d.ts +20 -0
- package/lib/ice/src/internal/defaultRoute.js +134 -0
- package/lib/ice/src/internal/defaultRoute.js.map +1 -0
- package/lib/ice/src/internal/hostInterfaces.d.ts +17 -0
- package/lib/ice/src/internal/hostInterfaces.js +77 -0
- package/lib/ice/src/internal/hostInterfaces.js.map +1 -0
- package/lib/ice/src/internal/hostPreference.d.ts +24 -0
- package/lib/ice/src/internal/hostPreference.js +38 -0
- package/lib/ice/src/internal/hostPreference.js.map +1 -0
- package/lib/ice/src/internal/resolveHostAddresses.d.ts +56 -8
- package/lib/ice/src/internal/resolveHostAddresses.js +127 -24
- package/lib/ice/src/internal/resolveHostAddresses.js.map +1 -1
- package/lib/ice/src/internal/selectAddresses.d.ts +27 -0
- package/lib/ice/src/internal/selectAddresses.js +37 -18
- package/lib/ice/src/internal/selectAddresses.js.map +1 -1
- package/lib/ice/src/nomination/regularNomination.d.ts +200 -0
- package/lib/ice/src/nomination/regularNomination.js +311 -0
- package/lib/ice/src/nomination/regularNomination.js.map +1 -0
- package/lib/ice/src/nomination/selectionReplacement.d.ts +138 -0
- package/lib/ice/src/nomination/selectionReplacement.js +371 -0
- package/lib/ice/src/nomination/selectionReplacement.js.map +1 -0
- package/lib/ice/src/provisional.d.ts +139 -0
- package/lib/ice/src/provisional.js +468 -0
- package/lib/ice/src/provisional.js.map +1 -0
- package/lib/ice/src/stun/protocol.d.ts +9 -2
- package/lib/ice/src/stun/protocol.js +16 -17
- package/lib/ice/src/stun/protocol.js.map +1 -1
- package/lib/ice/src/stun/tcpProtocol.d.ts +1 -1
- package/lib/ice/src/stun/tcpProtocol.js +7 -7
- package/lib/ice/src/stun/tcpProtocol.js.map +1 -1
- package/lib/ice/src/stun/transaction.d.ts +30 -1
- package/lib/ice/src/stun/transaction.js +90 -19
- package/lib/ice/src/stun/transaction.js.map +1 -1
- package/lib/ice/src/turn/credential.d.ts +49 -0
- package/lib/ice/src/turn/credential.js +78 -0
- package/lib/ice/src/turn/credential.js.map +1 -0
- package/lib/ice/src/turn/protocol.d.ts +31 -10
- package/lib/ice/src/turn/protocol.js +127 -51
- package/lib/ice/src/turn/protocol.js.map +1 -1
- package/lib/ice/src/types/model.d.ts +16 -5
- package/lib/ice/src/types/model.js.map +1 -1
- package/lib/ice-server/src/stun/attributes.d.ts +2 -0
- package/lib/ice-server/src/stun/attributes.js +11 -1
- package/lib/ice-server/src/stun/attributes.js.map +1 -1
- package/lib/ice-server/src/stun/const.d.ts +44 -17
- package/lib/ice-server/src/stun/const.js +31 -19
- package/lib/ice-server/src/stun/const.js.map +1 -1
- package/lib/ice-server/src/stun/message.d.ts +29 -4
- package/lib/ice-server/src/stun/message.js +115 -24
- package/lib/ice-server/src/stun/message.js.map +1 -1
- package/lib/index.mjs +35121 -22337
- package/lib/nonstandard/index.mjs +3169 -1399
- package/lib/polyfill/dom.mjs +24650 -12365
- package/lib/polyfill/index.mjs +24650 -12365
- package/lib/rtp/src/codec/assertPayload.d.ts +4 -0
- package/lib/rtp/src/codec/assertPayload.js +12 -0
- package/lib/rtp/src/codec/assertPayload.js.map +1 -0
- package/lib/rtp/src/codec/av1.js +2 -0
- package/lib/rtp/src/codec/av1.js.map +1 -1
- package/lib/rtp/src/codec/h264.js +35 -43
- package/lib/rtp/src/codec/h264.js.map +1 -1
- package/lib/rtp/src/codec/vp8.js +11 -5
- package/lib/rtp/src/codec/vp8.js.map +1 -1
- package/lib/rtp/src/codec/vp9.js +12 -0
- package/lib/rtp/src/codec/vp9.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/container.js +2 -1
- package/lib/rtp/src/extra/container/mp4/container.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/exp-golomb.js +2 -1
- package/lib/rtp/src/extra/container/mp4/exp-golomb.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/h264.d.ts +21 -17
- package/lib/rtp/src/extra/container/mp4/h264.js +26 -24
- package/lib/rtp/src/extra/container/mp4/h264.js.map +1 -1
- package/lib/rtp/src/extra/container/ogg/index.d.ts +1 -0
- package/lib/rtp/src/extra/container/ogg/index.js +1 -0
- package/lib/rtp/src/extra/container/ogg/index.js.map +1 -1
- package/lib/rtp/src/extra/container/ogg/writer.d.ts +90 -0
- package/lib/rtp/src/extra/container/ogg/writer.js +300 -0
- package/lib/rtp/src/extra/container/ogg/writer.js.map +1 -0
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js +6 -3
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js.map +1 -1
- package/lib/rtp/src/extra/processor/depacketizer.d.ts +5 -0
- package/lib/rtp/src/extra/processor/depacketizer.js +28 -2
- package/lib/rtp/src/extra/processor/depacketizer.js.map +1 -1
- package/lib/rtp/src/extra/processor/dtx.js +4 -2
- package/lib/rtp/src/extra/processor/dtx.js.map +1 -1
- package/lib/rtp/src/extra/processor/index.d.ts +2 -0
- package/lib/rtp/src/extra/processor/index.js +2 -0
- package/lib/rtp/src/extra/processor/index.js.map +1 -1
- package/lib/rtp/src/extra/processor/jitterBuffer.d.ts +29 -6
- package/lib/rtp/src/extra/processor/jitterBuffer.js +101 -111
- package/lib/rtp/src/extra/processor/jitterBuffer.js.map +1 -1
- package/lib/rtp/src/extra/processor/jitterBufferTransformer.js +2 -1
- package/lib/rtp/src/extra/processor/jitterBufferTransformer.js.map +1 -1
- package/lib/rtp/src/extra/processor/lipsync.d.ts +63 -0
- package/lib/rtp/src/extra/processor/lipsync.js +202 -51
- package/lib/rtp/src/extra/processor/lipsync.js.map +1 -1
- package/lib/rtp/src/extra/processor/mp4.d.ts +0 -6
- package/lib/rtp/src/extra/processor/mp4.js +6 -3
- package/lib/rtp/src/extra/processor/mp4.js.map +1 -1
- package/lib/rtp/src/extra/processor/mute.js +4 -2
- package/lib/rtp/src/extra/processor/mute.js.map +1 -1
- package/lib/rtp/src/extra/processor/nack.js +4 -2
- package/lib/rtp/src/extra/processor/nack.js.map +1 -1
- package/lib/rtp/src/extra/processor/ntpTime.js +4 -6
- package/lib/rtp/src/extra/processor/ntpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/ogg.d.ts +72 -0
- package/lib/rtp/src/extra/processor/ogg.js +221 -0
- package/lib/rtp/src/extra/processor/ogg.js.map +1 -0
- package/lib/rtp/src/extra/processor/oggCallback.d.ts +21 -0
- package/lib/rtp/src/extra/processor/oggCallback.js +97 -0
- package/lib/rtp/src/extra/processor/oggCallback.js.map +1 -0
- package/lib/rtp/src/extra/processor/rtpCallback.js +2 -1
- package/lib/rtp/src/extra/processor/rtpCallback.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpStream.js +2 -1
- package/lib/rtp/src/extra/processor/rtpStream.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpTime.js +2 -1
- package/lib/rtp/src/extra/processor/rtpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/webm.js +14 -7
- package/lib/rtp/src/extra/processor/webm.js.map +1 -1
- package/lib/rtp/src/extra/processor/webmCallback.js.map +1 -1
- package/lib/rtp/src/index.d.ts +8 -0
- package/lib/rtp/src/index.js +8 -0
- package/lib/rtp/src/index.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.d.ts +4 -0
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js +4 -0
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js.map +1 -1
- package/lib/rtp/src/rtcp/rtcp.js +8 -4
- package/lib/rtp/src/rtcp/rtcp.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.d.ts +58 -0
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.js +143 -0
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.js.map +1 -0
- package/lib/rtp/src/rtcp/rtpfb/twcc.d.ts +35 -13
- package/lib/rtp/src/rtcp/rtpfb/twcc.js +132 -54
- package/lib/rtp/src/rtcp/rtpfb/twcc.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.d.ts +13 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.js +29 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.js.map +1 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.d.ts +41 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.js +89 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.js.map +1 -0
- package/lib/rtp/src/rtcp/sr.js +1 -0
- package/lib/rtp/src/rtcp/sr.js.map +1 -1
- package/lib/rtp/src/rtp/continuity.d.ts +49 -0
- package/lib/rtp/src/rtp/continuity.js +120 -0
- package/lib/rtp/src/rtp/continuity.js.map +1 -0
- package/lib/rtp/src/rtp/headerExtension.js +41 -21
- package/lib/rtp/src/rtp/headerExtension.js.map +1 -1
- package/lib/rtp/src/rtp/padding.d.ts +17 -0
- package/lib/rtp/src/rtp/padding.js +37 -0
- package/lib/rtp/src/rtp/padding.js.map +1 -0
- package/lib/rtp/src/rtp/red/encoder.d.ts +10 -0
- package/lib/rtp/src/rtp/red/encoder.js +14 -1
- package/lib/rtp/src/rtp/red/encoder.js.map +1 -1
- package/lib/rtp/src/rtp/red/packet.js +24 -8
- package/lib/rtp/src/rtp/red/packet.js.map +1 -1
- package/lib/rtp/src/rtp/rtp.d.ts +24 -1
- package/lib/rtp/src/rtp/rtp.js +70 -29
- package/lib/rtp/src/rtp/rtp.js.map +1 -1
- package/lib/rtp/src/rtp/rtx.js +3 -0
- package/lib/rtp/src/rtp/rtx.js.map +1 -1
- package/lib/rtp/src/rtp/sendHeaderExtensions.d.ts +36 -0
- package/lib/rtp/src/rtp/sendHeaderExtensions.js +85 -0
- package/lib/rtp/src/rtp/sendHeaderExtensions.js.map +1 -0
- package/lib/rtp/src/rtp/timelineRewriter.d.ts +178 -0
- package/lib/rtp/src/rtp/timelineRewriter.js +417 -0
- package/lib/rtp/src/rtp/timelineRewriter.js.map +1 -0
- package/lib/rtp/src/srtp/cipher/ctr.js +4 -2
- package/lib/rtp/src/srtp/cipher/ctr.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/index.js +8 -4
- package/lib/rtp/src/srtp/cipher/index.js.map +1 -1
- package/lib/rtp/src/srtp/context/context.js +6 -3
- package/lib/rtp/src/srtp/context/context.js.map +1 -1
- package/lib/rtp/src/srtp/context/srtcp.d.ts +1 -1
- package/lib/rtp/src/srtp/context/srtcp.js +33 -0
- package/lib/rtp/src/srtp/context/srtcp.js.map +1 -1
- package/lib/rtp/src/srtp/context/srtp.d.ts +1 -1
- package/lib/rtp/src/srtp/context/srtp.js +34 -10
- package/lib/rtp/src/srtp/context/srtp.js.map +1 -1
- package/lib/rtp/src/srtp/error.d.ts +8 -0
- package/lib/rtp/src/srtp/error.js +13 -1
- package/lib/rtp/src/srtp/error.js.map +1 -1
- package/lib/rtp/src/srtp/packet.js +4 -1
- package/lib/rtp/src/srtp/packet.js.map +1 -1
- package/lib/rtp/src/srtp/replay.d.ts +24 -0
- package/lib/rtp/src/srtp/replay.js +75 -0
- package/lib/rtp/src/srtp/replay.js.map +1 -0
- package/lib/rtp/src/srtp/session.js +2 -1
- package/lib/rtp/src/srtp/session.js.map +1 -1
- package/lib/rtp/src/srtp/srtcp.js +2 -1
- package/lib/rtp/src/srtp/srtcp.js.map +1 -1
- package/lib/rtp/src/srtp/srtp.js +2 -1
- package/lib/rtp/src/srtp/srtp.js.map +1 -1
- package/lib/rtp/src/util.js +2 -1
- package/lib/rtp/src/util.js.map +1 -1
- package/lib/sctp/src/chunk.d.ts +5 -0
- package/lib/sctp/src/chunk.js +31 -8
- package/lib/sctp/src/chunk.js.map +1 -1
- package/lib/sctp/src/const.d.ts +25 -17
- package/lib/sctp/src/const.js +23 -19
- package/lib/sctp/src/const.js.map +1 -1
- package/lib/sctp/src/param.d.ts +6 -2
- package/lib/sctp/src/param.js +22 -8
- package/lib/sctp/src/param.js.map +1 -1
- package/lib/sctp/src/sctp.d.ts +85 -0
- package/lib/sctp/src/sctp.js +707 -126
- package/lib/sctp/src/sctp.js.map +1 -1
- package/lib/sctp/src/transport.js +4 -2
- package/lib/sctp/src/transport.js.map +1 -1
- package/lib/webrtc/src/api/compatibilityOptions.d.ts +33 -0
- package/lib/webrtc/src/api/compatibilityOptions.js +33 -0
- package/lib/webrtc/src/api/compatibilityOptions.js.map +1 -0
- package/lib/webrtc/src/api/peerConfig.d.ts +385 -28
- package/lib/webrtc/src/api/peerConfig.js +121 -14
- package/lib/webrtc/src/api/peerConfig.js.map +1 -1
- package/lib/webrtc/src/api/peerConnectionEvents.d.ts +77 -1
- package/lib/webrtc/src/api/peerConnectionEvents.js +105 -1
- package/lib/webrtc/src/api/peerConnectionEvents.js.map +1 -1
- package/lib/webrtc/src/dataChannel.d.ts +10 -0
- package/lib/webrtc/src/dataChannel.js +24 -4
- package/lib/webrtc/src/dataChannel.js.map +1 -1
- package/lib/webrtc/src/helper.d.ts +8 -0
- package/lib/webrtc/src/helper.js +40 -4
- package/lib/webrtc/src/helper.js.map +1 -1
- package/lib/webrtc/src/media/codecCompatibility.d.ts +87 -1
- package/lib/webrtc/src/media/codecCompatibility.js +338 -12
- package/lib/webrtc/src/media/codecCompatibility.js.map +1 -1
- package/lib/webrtc/src/media/index.d.ts +10 -0
- package/lib/webrtc/src/media/index.js +70 -0
- package/lib/webrtc/src/media/index.js.map +1 -1
- package/lib/webrtc/src/media/receiver/nack.d.ts +43 -10
- package/lib/webrtc/src/media/receiver/nack.js +246 -88
- package/lib/webrtc/src/media/receiver/nack.js.map +1 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.d.ts +61 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.js +218 -63
- package/lib/webrtc/src/media/receiver/receiverTwcc.js.map +1 -1
- package/lib/webrtc/src/media/router.d.ts +241 -40
- package/lib/webrtc/src/media/router.js +676 -205
- package/lib/webrtc/src/media/router.js.map +1 -1
- package/lib/webrtc/src/media/routing/pendingRoutes.d.ts +26 -0
- package/lib/webrtc/src/media/routing/pendingRoutes.js +48 -0
- package/lib/webrtc/src/media/routing/pendingRoutes.js.map +1 -0
- package/lib/webrtc/src/media/routing/ridRouting.d.ts +37 -0
- package/lib/webrtc/src/media/routing/ridRouting.js +74 -0
- package/lib/webrtc/src/media/routing/ridRouting.js.map +1 -0
- package/lib/webrtc/src/media/routing/routeTable.d.ts +60 -0
- package/lib/webrtc/src/media/routing/routeTable.js +95 -0
- package/lib/webrtc/src/media/routing/routeTable.js.map +1 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.d.ts +34 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.js +165 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.js.map +1 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.d.ts +55 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.js +117 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.js.map +1 -0
- package/lib/webrtc/src/media/rtpReceiver.d.ts +252 -2
- package/lib/webrtc/src/media/rtpReceiver.js +833 -44
- package/lib/webrtc/src/media/rtpReceiver.js.map +1 -1
- package/lib/webrtc/src/media/rtpSender.d.ts +191 -70
- package/lib/webrtc/src/media/rtpSender.js +631 -448
- package/lib/webrtc/src/media/rtpSender.js.map +1 -1
- package/lib/webrtc/src/media/rtpTransceiver.d.ts +19 -3
- package/lib/webrtc/src/media/rtpTransceiver.js +74 -9
- package/lib/webrtc/src/media/rtpTransceiver.js.map +1 -1
- package/lib/webrtc/src/media/sender/bandwidthEstimator.d.ts +249 -0
- package/lib/webrtc/src/media/sender/bandwidthEstimator.js +144 -0
- package/lib/webrtc/src/media/sender/bandwidthEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.d.ts +20 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.js +26 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.d.ts +70 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.js +175 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.d.ts +18 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.js +44 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.d.ts +79 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.js +289 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.d.ts +87 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.js +429 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.d.ts +21 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.js +84 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.d.ts +37 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.js +74 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.d.ts +383 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.js +408 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.d.ts +406 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.js +1391 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.d.ts +19 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.js +75 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.d.ts +68 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.js +201 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.d.ts +26 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.js +72 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.d.ts +41 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.js +99 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.d.ts +247 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.js +1042 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.d.ts +26 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.js +132 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.d.ts +305 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.js +1073 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.d.ts +60 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.js +151 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.d.ts +44 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.js +246 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/index.d.ts +7 -0
- package/lib/webrtc/src/media/sender/estimators/index.js +19 -0
- package/lib/webrtc/src/media/sender/estimators/index.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.d.ts +64 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.js +216 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.d.ts +117 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.js +250 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.js.map +1 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.d.ts +40 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.js +153 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.js.map +1 -0
- package/lib/webrtc/src/media/sender/padding.d.ts +45 -0
- package/lib/webrtc/src/media/sender/padding.js +134 -0
- package/lib/webrtc/src/media/sender/padding.js.map +1 -0
- package/lib/webrtc/src/media/sender/pendingRtp.d.ts +35 -0
- package/lib/webrtc/src/media/sender/pendingRtp.js +120 -0
- package/lib/webrtc/src/media/sender/pendingRtp.js.map +1 -0
- package/lib/webrtc/src/media/sender/rtpWire.d.ts +13 -0
- package/lib/webrtc/src/media/sender/rtpWire.js +38 -0
- package/lib/webrtc/src/media/sender/rtpWire.js.map +1 -0
- package/lib/webrtc/src/media/sender/sendPacer.d.ts +27 -0
- package/lib/webrtc/src/media/sender/sendPacer.js +110 -0
- package/lib/webrtc/src/media/sender/sendPacer.js.map +1 -0
- package/lib/webrtc/src/media/sender/senderBWE.d.ts +8 -33
- package/lib/webrtc/src/media/sender/senderBWE.js +5 -154
- package/lib/webrtc/src/media/sender/senderBWE.js.map +1 -1
- package/lib/webrtc/src/media/sender/senderReportHistory.d.ts +51 -0
- package/lib/webrtc/src/media/sender/senderReportHistory.js +111 -0
- package/lib/webrtc/src/media/sender/senderReportHistory.js.map +1 -0
- package/lib/webrtc/src/media/sender/senderStats.d.ts +101 -0
- package/lib/webrtc/src/media/sender/senderStats.js +317 -0
- package/lib/webrtc/src/media/sender/senderStats.js.map +1 -0
- package/lib/webrtc/src/media/track.d.ts +29 -2
- package/lib/webrtc/src/media/track.js +32 -5
- package/lib/webrtc/src/media/track.js.map +1 -1
- package/lib/webrtc/src/negotiation/bundleTopology.d.ts +1 -5
- package/lib/webrtc/src/negotiation/bundleTopology.js +15 -11
- package/lib/webrtc/src/negotiation/bundleTopology.js.map +1 -1
- package/lib/webrtc/src/negotiation/descriptionValidation.js +12 -6
- package/lib/webrtc/src/negotiation/descriptionValidation.js.map +1 -1
- package/lib/webrtc/src/negotiation/negotiationNeeded.js +2 -1
- package/lib/webrtc/src/negotiation/negotiationNeeded.js.map +1 -1
- package/lib/webrtc/src/negotiation/remoteCandidates.js +10 -5
- package/lib/webrtc/src/negotiation/remoteCandidates.js.map +1 -1
- package/lib/webrtc/src/negotiation/remoteMediaApplication.d.ts +24 -7
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js +67 -27
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js.map +1 -1
- package/lib/webrtc/src/negotiation/transceiverPairing.d.ts +1 -0
- package/lib/webrtc/src/negotiation/transceiverPairing.js +62 -0
- package/lib/webrtc/src/negotiation/transceiverPairing.js.map +1 -0
- package/lib/webrtc/src/negotiation/transportActivation.d.ts +8 -1
- package/lib/webrtc/src/negotiation/transportActivation.js +40 -8
- package/lib/webrtc/src/negotiation/transportActivation.js.map +1 -1
- package/lib/webrtc/src/negotiationTransaction.d.ts +43 -5
- package/lib/webrtc/src/negotiationTransaction.js +129 -13
- package/lib/webrtc/src/negotiationTransaction.js.map +1 -1
- package/lib/webrtc/src/nonstandard/dummyMedia.js +2 -1
- package/lib/webrtc/src/nonstandard/dummyMedia.js.map +1 -1
- package/lib/webrtc/src/nonstandard/navigator.js +4 -3
- package/lib/webrtc/src/nonstandard/navigator.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/index.d.ts +32 -8
- package/lib/webrtc/src/nonstandard/recorder/index.js +81 -20
- package/lib/webrtc/src/nonstandard/recorder/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.d.ts +9 -7
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js +2 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.d.ts +32 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.js +185 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.js.map +1 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js +8 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia.js +2 -1
- package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
- package/lib/webrtc/src/peerConnection.d.ts +108 -6
- package/lib/webrtc/src/peerConnection.js +357 -36
- package/lib/webrtc/src/peerConnection.js.map +1 -1
- package/lib/webrtc/src/polyfill/globals.d.ts +2 -1
- package/lib/webrtc/src/polyfill/globals.js.map +1 -1
- package/lib/webrtc/src/polyfill/install.js +2 -0
- package/lib/webrtc/src/polyfill/install.js.map +1 -1
- package/lib/webrtc/src/polyfill/mediaDevices.js +2 -1
- package/lib/webrtc/src/polyfill/mediaDevices.js.map +1 -1
- package/lib/webrtc/src/sctpManager.d.ts +46 -14
- package/lib/webrtc/src/sctpManager.js +92 -25
- package/lib/webrtc/src/sctpManager.js.map +1 -1
- package/lib/webrtc/src/sdp.d.ts +69 -0
- package/lib/webrtc/src/sdp.js +151 -20
- package/lib/webrtc/src/sdp.js.map +1 -1
- package/lib/webrtc/src/sdpManager.d.ts +85 -4
- package/lib/webrtc/src/sdpManager.js +214 -14
- package/lib/webrtc/src/sdpManager.js.map +1 -1
- package/lib/webrtc/src/secureTransportManager.d.ts +89 -4
- package/lib/webrtc/src/secureTransportManager.js +184 -26
- package/lib/webrtc/src/secureTransportManager.js.map +1 -1
- package/lib/webrtc/src/transceiverManager.d.ts +82 -4
- package/lib/webrtc/src/transceiverManager.js +239 -41
- package/lib/webrtc/src/transceiverManager.js.map +1 -1
- package/lib/webrtc/src/transport/dtls.d.ts +147 -1
- package/lib/webrtc/src/transport/dtls.js +446 -50
- package/lib/webrtc/src/transport/dtls.js.map +1 -1
- package/lib/webrtc/src/transport/ice.d.ts +71 -90
- package/lib/webrtc/src/transport/ice.js +250 -42
- package/lib/webrtc/src/transport/ice.js.map +1 -1
- package/lib/webrtc/src/transport/sctp.d.ts +25 -0
- package/lib/webrtc/src/transport/sctp.js +153 -22
- package/lib/webrtc/src/transport/sctp.js.map +1 -1
- package/lib/webrtc/src/utils.d.ts +69 -3
- package/lib/webrtc/src/utils.js +105 -16
- package/lib/webrtc/src/utils.js.map +1 -1
- package/package.json +9 -6
package/lib/ice/src/ice.d.ts
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import { type Address, Event } from "./imports/common";
|
|
2
1
|
import { Candidate } from "./candidate";
|
|
2
|
+
import type { IceCandidateErrorInfo, IceServerReachedInfo } from "./candidateError";
|
|
3
3
|
import { MdnsLookup } from "./dns/lookup";
|
|
4
|
-
import { CandidatePair, type IceConnection, type IceOptions, type IceState } from "./iceBase";
|
|
4
|
+
import { CandidatePair, type IceConnection, type IceOptions, type IceState, type NormalizedTurnServer } from "./iceBase";
|
|
5
|
+
import { type Address, Event } from "./imports/common";
|
|
5
6
|
import { Message } from "./stun/message";
|
|
6
7
|
import type { Protocol } from "./types/model";
|
|
8
|
+
/**
|
|
9
|
+
* The URL `onIceCandidateError` names the built-in default STUN server by:
|
|
10
|
+
* it is in no configuration, so werift synthesizes one.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_STUN_SERVER_URL = "stun:stun.l.google.com:19302";
|
|
7
13
|
export declare class Connection implements IceConnection {
|
|
8
14
|
private _iceControlling;
|
|
9
15
|
localUsername: string;
|
|
10
16
|
localPassword: string;
|
|
11
17
|
remoteIsLite: boolean;
|
|
18
|
+
/** The peer advertised `a=ice-options:renomination` (see `IceOptions.renomination`). */
|
|
19
|
+
remoteRenomination: boolean;
|
|
20
|
+
remoteIceOptions: string[];
|
|
12
21
|
remotePassword: string;
|
|
13
22
|
remoteUsername: string;
|
|
14
23
|
checkList: CandidatePair[];
|
|
15
24
|
localCandidates: Candidate[];
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
/**
|
|
26
|
+
* STUN servers gathering queries: the configured ones (see
|
|
27
|
+
* normalizeIceServerOptions), or the built-in default when none is
|
|
28
|
+
* configured and useDefaultStunServer is not false.
|
|
29
|
+
*/
|
|
30
|
+
stunServers: Address[];
|
|
31
|
+
/** Whether stunServers is the built-in default (none configured). */
|
|
32
|
+
private usesDefaultStunServer;
|
|
33
|
+
/** TURN servers gathering allocates on, one allocation each. */
|
|
34
|
+
turnServers: NormalizedTurnServer[];
|
|
18
35
|
options: IceOptions;
|
|
19
36
|
remoteCandidatesEnd: boolean;
|
|
20
37
|
/**
|
|
@@ -23,11 +40,17 @@ export declare class Connection implements IceConnection {
|
|
|
23
40
|
* once those resolutions settle.
|
|
24
41
|
*/
|
|
25
42
|
private remoteCandidatesEndRequested;
|
|
26
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* mDNS resolutions of remote candidates that arrived before
|
|
45
|
+
* end-of-candidates. close() (and restart()) closes `lookup`, which rejects
|
|
46
|
+
* them at once.
|
|
47
|
+
*/
|
|
27
48
|
private readonly remoteResolutions;
|
|
28
49
|
localCandidatesEnd: boolean;
|
|
29
50
|
/** connect() began this generation's checks (their outcome sets the state). */
|
|
30
51
|
private checksBegun;
|
|
52
|
+
/** connect() stopped scheduling checks (a later pair must start its own). */
|
|
53
|
+
private schedulingStopped;
|
|
31
54
|
generation: number;
|
|
32
55
|
/**
|
|
33
56
|
* Counts every reset of the remote generation: a local ICE restart and a
|
|
@@ -48,10 +71,22 @@ export declare class Connection implements IceConnection {
|
|
|
48
71
|
private restarted;
|
|
49
72
|
private readonly tieBreaker;
|
|
50
73
|
state: IceState;
|
|
74
|
+
/** close() ran; unlike `state`, a restart does not reset it. */
|
|
75
|
+
private closed;
|
|
76
|
+
/** Resolves remote mDNS candidates; closed (pending lookups cancelled) by restart() and close(). */
|
|
51
77
|
lookup?: MdnsLookup;
|
|
52
78
|
private _remoteCandidates;
|
|
53
79
|
nominated?: CandidatePair;
|
|
54
|
-
|
|
80
|
+
/** The ICE-lite nomination (first valid pair, in `checkStart`) is in flight. */
|
|
81
|
+
private liteNominating;
|
|
82
|
+
/** Regular nomination (RFC 8445 §8.1.1) of the live checklist. */
|
|
83
|
+
private readonly nomination;
|
|
84
|
+
/** Semi-aggressive nomination and renomination: replacing the selection. */
|
|
85
|
+
private readonly selection;
|
|
86
|
+
/** See `NominationHint`; set by the restart that ends a provisional checklist. */
|
|
87
|
+
private nominationHint?;
|
|
88
|
+
/** USE-CANDIDATE re-sent for a pair selected before the agent became controlling (`confirmSelections`). */
|
|
89
|
+
private readonly selectionConfirmations;
|
|
55
90
|
/**
|
|
56
91
|
* Aborted when the remote generation ends (restart, restartRemote, close):
|
|
57
92
|
* every check and nomination transaction of that generation stops with it.
|
|
@@ -64,16 +99,21 @@ export declare class Connection implements IceConnection {
|
|
|
64
99
|
* - `retryCheck` (487 role conflict / 401 retry): the handle of the check
|
|
65
100
|
* it replaces and this signal (the retry is a `checkStart`).
|
|
66
101
|
* - regular nomination in `checkStart` (toward an ICE-lite peer): the
|
|
67
|
-
* check's signal; `isStaleNomination` guards `
|
|
68
|
-
* and `checkComplete`.
|
|
69
|
-
* - `
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* `
|
|
102
|
+
* check's signal; `isStaleNomination` guards `liteNominating`, the pair
|
|
103
|
+
* state and `checkComplete`.
|
|
104
|
+
* - `RegularNomination` (live: `sendNomination`): this signal and the
|
|
105
|
+
* attempt's own, which `reset()` (restart, restartRemote,
|
|
106
|
+
* resetNominatedPair, close) and `invalidate()` (role change) abort; a
|
|
107
|
+
* result of a replaced attempt is ignored. Its delay timer is cleared by
|
|
108
|
+
* `reset()`.
|
|
109
|
+
* - `ProvisionalChecklist` checks and nominations: `generation.checks`
|
|
110
|
+
* (`end()`, a replacement pranswer, close); `belongs()`, and
|
|
111
|
+
* the provisional `RegularNomination` as above.
|
|
112
|
+
* - consent checks (`ConsentFreshness`): a per-request `AbortController`
|
|
113
|
+
* and `consent.stop()`; its session id.
|
|
74
114
|
* - `serverReflexiveCandidate` (gathering): `protocol.close()`; otherwise
|
|
75
115
|
* it ends by its retransmission timeout, and `stale()` drops the
|
|
76
|
-
* candidate of an ended gather.
|
|
116
|
+
* candidate (or the failure) of an ended gather.
|
|
77
117
|
* - TURN client requests: the `closing` signal and `TurnProtocol.close()`.
|
|
78
118
|
* Regression tests: `tests/ice/check-cancel.test.ts`.
|
|
79
119
|
*/
|
|
@@ -96,20 +136,47 @@ export declare class Connection implements IceConnection {
|
|
|
96
136
|
private earlyChecksDone;
|
|
97
137
|
private localCandidatesStart;
|
|
98
138
|
private protocols;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
139
|
+
/** RFC 7675 consent freshness of the selected pair. */
|
|
140
|
+
private readonly consent;
|
|
141
|
+
/** Host, server-reflexive and relay gathering (`CandidateGatherer`). */
|
|
142
|
+
private readonly gatherer;
|
|
143
|
+
/**
|
|
144
|
+
* Settles when the background server-reflexive queries of the current
|
|
145
|
+
* generation end (see {@link Connection.waitForLocalCandidatesEnd}).
|
|
146
|
+
*/
|
|
147
|
+
private localCandidatesEndPromise?;
|
|
106
148
|
/** ICE restart generation checked beside the selected current pair. */
|
|
107
|
-
private
|
|
108
|
-
/** Last server-reflexive candidate each UDP socket advertised. */
|
|
109
|
-
private readonly reflexiveBySocket;
|
|
149
|
+
private readonly provisionalChecklist;
|
|
110
150
|
readonly onData: Event<[Buffer<ArrayBufferLike>]>;
|
|
111
151
|
readonly stateChanged: Event<[IceState]>;
|
|
112
152
|
readonly onIceCandidate: Event<[Candidate]>;
|
|
153
|
+
/**
|
|
154
|
+
* A STUN server query or TURN allocation of the current generation's
|
|
155
|
+
* gathering failed (W3C `icecandidateerror`), synchronously and without
|
|
156
|
+
* changing the gathering: other servers and sockets go on, and gathering
|
|
157
|
+
* still completes. A server answering with an error gives its ERROR-CODE,
|
|
158
|
+
* once per local socket and generation. One that is not reached (timeout,
|
|
159
|
+
* `stunGatherTimeout`, DNS, connect or socket error) gives 701, once per
|
|
160
|
+
* server and generation and only when no local socket reached it (a STUN
|
|
161
|
+
* server is reported when the last socket's query ended). A TURN server's UDP attempt and its TCP fallback are
|
|
162
|
+
* one failure, reported when both failed (a server's error code wins over
|
|
163
|
+
* 701). A credential retry (401 / 438) that succeeds is not a failure.
|
|
164
|
+
* Nothing is fired for a replaced generation or after close (the event
|
|
165
|
+
* completes then). A STUN failure carries the host address of a socket
|
|
166
|
+
* that asked; a TURN one carries none. The built-in default STUN server (none
|
|
167
|
+
* configured, `useDefaultStunServer` not false) is named by the
|
|
168
|
+
* synthesized URL {@link DEFAULT_STUN_SERVER_URL} in `server.urls`.
|
|
169
|
+
*/
|
|
170
|
+
readonly onIceCandidateError: Event<[IceCandidateErrorInfo]>;
|
|
171
|
+
/**
|
|
172
|
+
* A STUN or TURN server of the current generation's gathering answered:
|
|
173
|
+
* a STUN query or TURN allocation gave a candidate, or the server sent an
|
|
174
|
+
* error response (see {@link IceServerReachedInfo}). Synchronous; nothing
|
|
175
|
+
* is fired for a replaced generation or after close.
|
|
176
|
+
*/
|
|
177
|
+
readonly onIceServerReached: Event<[IceServerReachedInfo]>;
|
|
178
|
+
/** The staged ICE restart generation (`ProvisionalChecklist`). */
|
|
179
|
+
private get provisional();
|
|
113
180
|
constructor(_iceControlling: boolean, options?: Partial<IceOptions>);
|
|
114
181
|
/**
|
|
115
182
|
* Replace STUN/TURN servers after construction.
|
|
@@ -122,11 +189,23 @@ export declare class Connection implements IceConnection {
|
|
|
122
189
|
*/
|
|
123
190
|
setIceServers(options: Partial<IceOptions>): void;
|
|
124
191
|
/**
|
|
125
|
-
* Derive Connection.
|
|
192
|
+
* Derive Connection.stunServers / turnServers from this.options.
|
|
126
193
|
* Shared by the constructor and setIceServers so both paths validate and
|
|
127
194
|
* default identically.
|
|
128
195
|
*/
|
|
129
196
|
private applyStunTurnServersFromOptions;
|
|
197
|
+
/** @deprecated The first of {@link Connection.stunServers}. */
|
|
198
|
+
get stunServer(): Address | undefined;
|
|
199
|
+
/** @deprecated Replaces {@link Connection.stunServers} with this one server (none for undefined). */
|
|
200
|
+
set stunServer(server: Address | undefined);
|
|
201
|
+
/** @deprecated The address of the first of {@link Connection.turnServers}. */
|
|
202
|
+
get turnServer(): Address | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* @deprecated Replaces {@link Connection.turnServers} with this one server
|
|
205
|
+
* and the deprecated turnUsername / turnPassword / turnTransport options
|
|
206
|
+
* (none for undefined).
|
|
207
|
+
*/
|
|
208
|
+
set turnServer(server: Address | undefined);
|
|
130
209
|
get iceControlling(): boolean;
|
|
131
210
|
set iceControlling(value: boolean);
|
|
132
211
|
get iceLite(): boolean;
|
|
@@ -142,13 +221,8 @@ export declare class Connection implements IceConnection {
|
|
|
142
221
|
* replaces (or close ends), and start a signal for the next generation.
|
|
143
222
|
*/
|
|
144
223
|
private cancelChecks;
|
|
145
|
-
/**
|
|
146
|
-
* Drop the provisional generation and stop the checks still in flight for
|
|
147
|
-
* it (their retransmissions would outlive it).
|
|
148
|
-
*/
|
|
149
|
-
private endProvisional;
|
|
150
224
|
/** Accept provisional checks without changing the selected current pair. */
|
|
151
|
-
stageLocalCredentials(usernameFragment: string, password: string): void;
|
|
225
|
+
stageLocalCredentials(usernameFragment: string, password: string, gatherOptions?: Partial<IceOptions>): void;
|
|
152
226
|
discardStagedLocalCredentials(usernameFragment: string): void;
|
|
153
227
|
/** Remote credentials of the provisional generation (pranswer). */
|
|
154
228
|
setProvisionalRemoteParams({ usernameFragment, password, }: {
|
|
@@ -159,11 +233,6 @@ export declare class Connection implements IceConnection {
|
|
|
159
233
|
/** Start checks for the provisional generation; the selected pair is kept. */
|
|
160
234
|
startProvisionalChecks(): void;
|
|
161
235
|
get provisionalNominated(): CandidatePair | undefined;
|
|
162
|
-
private tryProvisionalPair;
|
|
163
|
-
private checkProvisional;
|
|
164
|
-
private nominateProvisional;
|
|
165
|
-
/** Incoming check for the provisional ufrag; never touches the current checklist. */
|
|
166
|
-
private checkIncomingProvisional;
|
|
167
236
|
/** Called after restart, before re-gathering the chosen generation. */
|
|
168
237
|
commitLocalCredentials(usernameFragment: string, password: string): void;
|
|
169
238
|
/**
|
|
@@ -173,6 +242,8 @@ export declare class Connection implements IceConnection {
|
|
|
173
242
|
*/
|
|
174
243
|
dropOtherRemoteGenerations(usernameFragment: string): void;
|
|
175
244
|
resetNominatedPair(): void;
|
|
245
|
+
get remoteIce2(): boolean;
|
|
246
|
+
setRemoteIceOptions(options: string[]): void;
|
|
176
247
|
setRemoteParams({ iceLite, usernameFragment, password, }: {
|
|
177
248
|
iceLite: boolean;
|
|
178
249
|
usernameFragment: string;
|
|
@@ -188,6 +259,15 @@ export declare class Connection implements IceConnection {
|
|
|
188
259
|
* allocation), so a caller may let it finish in the background.
|
|
189
260
|
*/
|
|
190
261
|
gatherCandidates(): Promise<void>;
|
|
262
|
+
/**
|
|
263
|
+
* Resolves when the current generation's gathering has ended
|
|
264
|
+
* (`localCandidatesEnd`): {@link Connection.gatherCandidates} returns once
|
|
265
|
+
* the host sockets, the TURN allocations and the representative socket's
|
|
266
|
+
* server-reflexive query are done, while the other host sockets' queries
|
|
267
|
+
* continue and trickle through `onIceCandidate`. Also resolves when the
|
|
268
|
+
* agent closes or restarts (the generation ends without its end).
|
|
269
|
+
*/
|
|
270
|
+
waitForLocalCandidatesEnd(): Promise<void>;
|
|
191
271
|
/**
|
|
192
272
|
* Whether gathering started for `generation` still belongs to the agent:
|
|
193
273
|
* no ICE restart replaced the generation and the agent is not closed.
|
|
@@ -198,6 +278,15 @@ export declare class Connection implements IceConnection {
|
|
|
198
278
|
/** Whether gathering contacts a STUN or TURN server (more than re-advertising sockets). */
|
|
199
279
|
get gathersFromServers(): boolean;
|
|
200
280
|
private appendLocalCandidate;
|
|
281
|
+
/**
|
|
282
|
+
* Report a failed STUN query / TURN allocation of the gathering whose
|
|
283
|
+
* `stale` is given (see onIceCandidateError). A failure that is not
|
|
284
|
+
* reported (cancelled), belongs to a replaced generation or arrives after
|
|
285
|
+
* close is dropped. A listener that throws does not stop the gathering.
|
|
286
|
+
*/
|
|
287
|
+
private emitCandidateError;
|
|
288
|
+
/** Report that `server` answered the gathering whose `stale` is given. */
|
|
289
|
+
private emitServerReached;
|
|
201
290
|
private ensureProtocol;
|
|
202
291
|
/**
|
|
203
292
|
* RFC 6544: the selected TCP connection is the only path for this component;
|
|
@@ -205,24 +294,25 @@ export declare class Connection implements IceConnection {
|
|
|
205
294
|
* so fail the same way as a consent expiry instead of waiting for it.
|
|
206
295
|
*/
|
|
207
296
|
private handleConnectionClosed;
|
|
208
|
-
private getCandidatePromises;
|
|
209
297
|
connect(): Promise<void>;
|
|
210
298
|
private unfreezeInitial;
|
|
211
299
|
private schedulingChecks;
|
|
212
300
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
301
|
+
* Mirror libwebrtc semi-aggressive nomination (not required by RFC 7675):
|
|
302
|
+
* attach USE-CANDIDATE to consent checks of the selected pair when we are
|
|
303
|
+
* controlling and the remote is ICE-lite, or we nominate semi-aggressively
|
|
304
|
+
* (a peer that became controlled after a role conflict, or lost the
|
|
305
|
+
* nominating response, learns the selection from them).
|
|
215
306
|
*/
|
|
216
|
-
private
|
|
307
|
+
private shouldNominateConsentRequest;
|
|
217
308
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
309
|
+
* Renomination: the NOMINATION value consent checks of the selected pair
|
|
310
|
+
* carry, so the peer keeps (or learns) the selection. A pair selected
|
|
311
|
+
* without a renomination of this agent (the peer nominated it while this
|
|
312
|
+
* agent was controlled) takes the next value.
|
|
221
313
|
*/
|
|
222
|
-
private
|
|
314
|
+
private consentNomination;
|
|
223
315
|
private canSendApplicationData;
|
|
224
|
-
private abortableDelay;
|
|
225
|
-
private queryConsent;
|
|
226
316
|
close(): Promise<void>;
|
|
227
317
|
private setState;
|
|
228
318
|
/**
|
|
@@ -242,45 +332,151 @@ export declare class Connection implements IceConnection {
|
|
|
242
332
|
private sortCheckList;
|
|
243
333
|
private findPair;
|
|
244
334
|
private applyIceControlling;
|
|
335
|
+
/**
|
|
336
|
+
* The agent became controlling with a pair already selected (live or
|
|
337
|
+
* provisional), e.g. one the peer nominated while this agent was
|
|
338
|
+
* controlled. The selection stays (RFC 8445 §8.1.1 allows no other pair),
|
|
339
|
+
* but the peer, controlled now, may still wait for a nomination: send
|
|
340
|
+
* USE-CANDIDATE for that pair, repeated on timeouts as a nomination is.
|
|
341
|
+
* A peer that selected the pair already keeps it.
|
|
342
|
+
*/
|
|
343
|
+
private confirmSelections;
|
|
344
|
+
private confirmSelection;
|
|
345
|
+
/**
|
|
346
|
+
* The role changed: a nomination in flight (live or provisional) was sent
|
|
347
|
+
* as the controlling agent and must not select a pair, fail one, or fail
|
|
348
|
+
* the agent under the new role. Its transaction stops; a controlling agent
|
|
349
|
+
* later nominates afresh.
|
|
350
|
+
*/
|
|
351
|
+
private invalidateNominations;
|
|
245
352
|
private switchRole;
|
|
246
353
|
private checkComplete;
|
|
354
|
+
/**
|
|
355
|
+
* Fail the check list once no pair can succeed and no nomination can still
|
|
356
|
+
* select one. Background gathering and remote trickle both delay this.
|
|
357
|
+
*/
|
|
358
|
+
private concludeCheckListIfExhausted;
|
|
247
359
|
checkStart: (pair: CandidatePair) => {
|
|
248
360
|
awaitable: Promise<void>;
|
|
249
361
|
resolve: (value: void | PromiseLike<void>) => void;
|
|
250
362
|
reject: (reason?: any) => void;
|
|
251
363
|
};
|
|
364
|
+
/**
|
|
365
|
+
* A check of the live checklist cancelled before its outcome (the
|
|
366
|
+
* checklist completed, `connect` cancels the remaining checks) leaves the
|
|
367
|
+
* pair Waiting instead of In-Progress, so the peer's checks on it still
|
|
368
|
+
* trigger one (7.2.1.4): a controlled agent that selected a lower pair can
|
|
369
|
+
* then follow a later nomination of this one. A nomination already received
|
|
370
|
+
* for it is checked at once (its triggering check came while the cancelled
|
|
371
|
+
* one was still in flight). A generation that ended or a closed agent
|
|
372
|
+
* changes nothing.
|
|
373
|
+
*/
|
|
374
|
+
private checkCancelled;
|
|
252
375
|
/**
|
|
253
376
|
* 487 / 401 retry of a check: the retry is cancelled with the check it
|
|
254
377
|
* replaces (its handle) and, through checkStart, with the generation.
|
|
255
378
|
*/
|
|
256
379
|
private retryCheck;
|
|
257
380
|
private isTcpPair;
|
|
381
|
+
private checkRequestOptions;
|
|
382
|
+
/** The agent is controlling and both agents are full ICE. */
|
|
383
|
+
private nominatesFullPeer;
|
|
258
384
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* nominates exactly one valid pair (RFC 8445 §8.1.1 regular nomination).
|
|
385
|
+
* Both agents advertised renomination (`IceOptions.renomination`): the
|
|
386
|
+
* controlling agent nominates with NOMINATION values instead of
|
|
387
|
+
* USE-CANDIDATE, whatever `IceOptions.nomination` says.
|
|
263
388
|
*/
|
|
264
|
-
private
|
|
265
|
-
|
|
389
|
+
private usesRenomination;
|
|
390
|
+
/**
|
|
391
|
+
* `nomination: "regular"`: RFC 8445 §8.1.1 regular nomination for every
|
|
392
|
+
* transport. A check that succeeds only makes its pair valid;
|
|
393
|
+
* `RegularNomination` later picks one valid pair and nominates it once
|
|
394
|
+
* with a separate USE-CANDIDATE check.
|
|
395
|
+
*/
|
|
396
|
+
private usesRegularNomination;
|
|
397
|
+
/**
|
|
398
|
+
* The default, as libwebrtc: checks carry USE-CANDIDATE until a pair is
|
|
399
|
+
* selected and afterwards for pairs that outrank the selected one, so the
|
|
400
|
+
* first pair that succeeds is selected at once and a higher-priority pair
|
|
401
|
+
* that succeeds later (a TURN/UDP candidate trickled after a TURN/TCP one
|
|
402
|
+
* connected) replaces it. A first-success-wins nomination would keep the
|
|
403
|
+
* lower-priority pair for the whole session.
|
|
404
|
+
*/
|
|
405
|
+
private usesSemiAggressiveNomination;
|
|
406
|
+
/**
|
|
407
|
+
* The controlling agent may move the selection to a higher-priority pair
|
|
408
|
+
* (semi-aggressive nomination, renomination): checks of pairs that outrank
|
|
409
|
+
* the selected one go on after the first selection.
|
|
410
|
+
*/
|
|
411
|
+
private replacesSelection;
|
|
266
412
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
413
|
+
* A pair semi-aggressive nomination and renomination may select: not an
|
|
414
|
+
* ICE-TCP pair (each TCP pair is its own connection, and nominating more
|
|
415
|
+
* than one could leave the agents on different connections after pruning;
|
|
416
|
+
* TCP pairs keep regular nomination, see `regularNominationPairs`), nor
|
|
417
|
+
* one the agent never checks (forceTurn).
|
|
270
418
|
*/
|
|
271
|
-
private
|
|
272
|
-
|
|
273
|
-
|
|
419
|
+
private replacesWith;
|
|
420
|
+
/**
|
|
421
|
+
* The pairs `RegularNomination` nominates from: every pair with
|
|
422
|
+
* `nomination: "regular"`, otherwise the ICE-TCP pairs (as before
|
|
423
|
+
* semi-aggressive nomination, #721).
|
|
424
|
+
*/
|
|
425
|
+
private regularNominationPairs;
|
|
426
|
+
/** `IceOptions.nominationDelayMs`, or its default when unset or invalid. */
|
|
427
|
+
private get nominationDelayMs();
|
|
428
|
+
/** A pair the agent never checks itself (forceTurn keeps it from the schedule). */
|
|
429
|
+
private isUncheckedPair;
|
|
430
|
+
/** The highest-priority valid pair of `pairs`. */
|
|
431
|
+
private bestValidPair;
|
|
432
|
+
private outranks;
|
|
433
|
+
/**
|
|
434
|
+
* The live checklist's side of regular nomination (`RegularNomination`):
|
|
435
|
+
* the controlling agent nominates the best valid pair once the checklist
|
|
436
|
+
* is quiet (see `decideNomination`).
|
|
437
|
+
*/
|
|
438
|
+
private liveNominationHost;
|
|
439
|
+
/**
|
|
440
|
+
* Send the USE-CANDIDATE check for a live `pair` (see `NominationOutcome`),
|
|
441
|
+
* or with `nomination` the renomination check that carries that
|
|
442
|
+
* NOMINATION value instead.
|
|
443
|
+
*/
|
|
444
|
+
private sendNomination;
|
|
445
|
+
/**
|
|
446
|
+
* No attempt of a USE-CANDIDATE check was answered, or the pair a
|
|
447
|
+
* provisional nomination may have selected (`NominationHint`) failed or
|
|
448
|
+
* never appeared. A request may still have reached the peer, and a
|
|
449
|
+
* controlled agent keeps the first pair
|
|
450
|
+
* nominated to it (RFC 8445 §8.1.1): nominating another pair could leave
|
|
451
|
+
* the two agents on different pairs. The agent nominates nothing else,
|
|
452
|
+
* connect() rejects and the agent fails (an ICE restart starts over), as a
|
|
453
|
+
* consent expiry does.
|
|
454
|
+
*/
|
|
455
|
+
private nominationAbandoned;
|
|
456
|
+
/**
|
|
457
|
+
* At the restart that ends the provisional checklist (a final answer): the
|
|
458
|
+
* pair it nominated, or sent a USE-CANDIDATE to that the peer did not
|
|
459
|
+
* refuse (see `NominationHint`).
|
|
460
|
+
*/
|
|
461
|
+
private provisionalNominationHint;
|
|
462
|
+
/** The agent was closed or restarted while the ICE-lite nomination was in flight. */
|
|
274
463
|
private isStaleNomination;
|
|
275
464
|
private addPair;
|
|
276
465
|
checkIncoming(message: Message, addr: Address, protocol: Protocol): void;
|
|
466
|
+
/**
|
|
467
|
+
* @param admit after a selection that may still be replaced, only pairs
|
|
468
|
+
* that could replace it join the checklist.
|
|
469
|
+
*/
|
|
277
470
|
private tryPair;
|
|
471
|
+
/** See `tryPair`: undefined admits every pair. */
|
|
472
|
+
private admitsPair;
|
|
278
473
|
/**
|
|
279
474
|
* Pair a local candidate gathered after remote candidates arrived (a late
|
|
280
475
|
* TURN allocation, a slow host socket) with them.
|
|
281
476
|
*/
|
|
282
477
|
private pairLocalProtocol;
|
|
283
478
|
private pairRemoteCandidate;
|
|
479
|
+
/** A connectivity check from this agent (`buildCheckRequest`). */
|
|
284
480
|
private buildRequest;
|
|
285
481
|
private pruneTcpConnections;
|
|
286
482
|
private respondError;
|