werift 0.25.1 → 0.26.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/lib/common/src/asn1.d.ts +42 -0
- package/lib/common/src/asn1.js +163 -0
- package/lib/common/src/asn1.js.map +1 -0
- package/lib/common/src/binaryData.js.map +1 -1
- package/lib/common/src/index.d.ts +6 -5
- package/lib/common/src/index.js +6 -5
- package/lib/common/src/index.js.map +1 -1
- package/lib/common/src/log.d.ts +12 -1
- package/lib/common/src/log.js +137 -5
- package/lib/common/src/log.js.map +1 -1
- package/lib/common/src/network.js.map +1 -1
- package/lib/common/src/queue.d.ts +41 -0
- package/lib/common/src/queue.js +146 -0
- package/lib/common/src/queue.js.map +1 -0
- package/lib/common/src/transport.d.ts +15 -2
- package/lib/common/src/transport.js +98 -14
- package/lib/common/src/transport.js.map +1 -1
- package/lib/dtls/src/cipher/create.js.map +1 -1
- package/lib/dtls/src/cipher/ec.js +8 -8
- package/lib/dtls/src/cipher/ec.js.map +1 -1
- package/lib/dtls/src/cipher/namedCurve.js +6 -7
- package/lib/dtls/src/cipher/namedCurve.js.map +1 -1
- package/lib/dtls/src/cipher/prf.d.ts +2 -2
- package/lib/dtls/src/cipher/prf.js +29 -8
- package/lib/dtls/src/cipher/prf.js.map +1 -1
- package/lib/dtls/src/cipher/suites/aead.d.ts +1 -1
- package/lib/dtls/src/context/certificate.d.ts +32 -0
- package/lib/dtls/src/context/certificate.js +54 -0
- package/lib/dtls/src/context/certificate.js.map +1 -0
- package/lib/dtls/src/context/cipher.d.ts +12 -6
- package/lib/dtls/src/context/cipher.js +52 -103
- package/lib/dtls/src/context/cipher.js.map +1 -1
- package/lib/dtls/src/context/transport.d.ts +4 -0
- package/lib/dtls/src/context/transport.js +14 -0
- package/lib/dtls/src/context/transport.js.map +1 -1
- package/lib/dtls/src/flight/client/flight5.js.map +1 -1
- package/lib/dtls/src/flight/flight.js +8 -1
- package/lib/dtls/src/flight/flight.js.map +1 -1
- package/lib/dtls/src/flight/server/flight2.js.map +1 -1
- package/lib/dtls/src/flight/server/flight4.d.ts +2 -1
- package/lib/dtls/src/flight/server/flight4.js +8 -2
- package/lib/dtls/src/flight/server/flight4.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/signature.d.ts +1 -1
- package/lib/dtls/src/handshake/extensions/signature.js.map +1 -1
- package/lib/dtls/src/handshake/message/alert.js +1 -1
- package/lib/dtls/src/handshake/message/alert.js.map +1 -1
- package/lib/dtls/src/handshake/message/certificate.js +1 -1
- package/lib/dtls/src/handshake/message/certificate.js.map +1 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js +2 -3
- package/lib/dtls/src/handshake/message/changeCipherSpec.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.d.ts +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.js +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/hello.js +1 -1
- package/lib/dtls/src/handshake/message/client/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js +1 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.d.ts +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.js +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/hello.d.ts +1 -1
- package/lib/dtls/src/handshake/message/server/hello.js +2 -2
- package/lib/dtls/src/handshake/message/server/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloDone.js +1 -1
- package/lib/dtls/src/handshake/message/server/helloDone.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js +1 -1
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/keyExchange.d.ts +1 -1
- package/lib/dtls/src/handshake/message/server/keyExchange.js +1 -1
- 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 +2 -2
- package/lib/dtls/src/handshake/random.js.map +1 -1
- package/lib/dtls/src/imports/common.d.ts +1 -0
- package/lib/dtls/src/imports/common.js +1 -0
- package/lib/dtls/src/imports/common.js.map +1 -1
- package/lib/dtls/src/index.d.ts +2 -2
- package/lib/dtls/src/index.js +2 -2
- package/lib/dtls/src/index.js.map +1 -1
- package/lib/dtls/src/record/message/fragment.d.ts +1 -1
- package/lib/dtls/src/record/message/fragment.js +3 -3
- package/lib/dtls/src/record/message/fragment.js.map +1 -1
- package/lib/dtls/src/record/message/header.js +2 -2
- package/lib/dtls/src/record/message/header.js.map +1 -1
- package/lib/dtls/src/server.js +1 -1
- package/lib/dtls/src/server.js.map +1 -1
- package/lib/dtls/src/socket.d.ts +2 -2
- package/lib/dtls/src/socket.js +2 -2
- package/lib/dtls/src/socket.js.map +1 -1
- package/lib/ice/src/exceptions.d.ts +30 -0
- package/lib/ice/src/exceptions.js +43 -1
- package/lib/ice/src/exceptions.js.map +1 -1
- package/lib/ice/src/helper.d.ts +1 -1
- package/lib/ice/src/ice.d.ts +142 -0
- package/lib/ice/src/ice.js +809 -53
- package/lib/ice/src/ice.js.map +1 -1
- package/lib/ice/src/iceBase.d.ts +49 -0
- package/lib/ice/src/iceBase.js.map +1 -1
- package/lib/ice/src/index.d.ts +5 -5
- package/lib/ice/src/index.js +5 -5
- package/lib/ice/src/index.js.map +1 -1
- package/lib/ice/src/internal/resolveHostAddresses.d.ts +26 -0
- package/lib/ice/src/internal/resolveHostAddresses.js +45 -0
- package/lib/ice/src/internal/resolveHostAddresses.js.map +1 -0
- package/lib/ice/src/stun/protocol.d.ts +3 -1
- package/lib/ice/src/stun/protocol.js +16 -0
- package/lib/ice/src/stun/protocol.js.map +1 -1
- package/lib/ice/src/stun/tcpProtocol.d.ts +2 -0
- package/lib/ice/src/stun/tcpProtocol.js +16 -1
- package/lib/ice/src/stun/tcpProtocol.js.map +1 -1
- package/lib/ice/src/stun/transaction.d.ts +5 -0
- package/lib/ice/src/stun/transaction.js +7 -1
- package/lib/ice/src/stun/transaction.js.map +1 -1
- package/lib/ice/src/turn/protocol.d.ts +73 -4
- package/lib/ice/src/turn/protocol.js +241 -12
- package/lib/ice/src/turn/protocol.js.map +1 -1
- package/lib/ice/src/utils.js.map +1 -1
- package/lib/ice-server/src/stun/message.d.ts +5 -1
- package/lib/ice-server/src/stun/message.js +33 -2
- package/lib/ice-server/src/stun/message.js.map +1 -1
- package/lib/ice-server/src/turn/auth.d.ts +1 -1
- package/lib/index.mjs +24263 -16477
- package/lib/nonstandard/index.mjs +9272 -6178
- package/lib/polyfill/dom.mjs +24872 -20543
- package/lib/polyfill/index.mjs +24872 -20543
- package/lib/rtp/src/codec/av1.d.ts +61 -1
- package/lib/rtp/src/codec/av1.js +332 -33
- package/lib/rtp/src/codec/av1.js.map +1 -1
- package/lib/rtp/src/codec/base.d.ts +49 -1
- package/lib/rtp/src/codec/base.js +81 -1
- package/lib/rtp/src/codec/base.js.map +1 -1
- package/lib/rtp/src/codec/g711.d.ts +37 -0
- package/lib/rtp/src/codec/g711.js +109 -0
- package/lib/rtp/src/codec/g711.js.map +1 -0
- package/lib/rtp/src/codec/g722.d.ts +31 -0
- package/lib/rtp/src/codec/g722.js +82 -0
- package/lib/rtp/src/codec/g722.js.map +1 -0
- package/lib/rtp/src/codec/h264.d.ts +81 -7
- package/lib/rtp/src/codec/h264.js +382 -21
- package/lib/rtp/src/codec/h264.js.map +1 -1
- package/lib/rtp/src/codec/h265.d.ts +101 -0
- package/lib/rtp/src/codec/h265.js +615 -0
- package/lib/rtp/src/codec/h265.js.map +1 -0
- package/lib/rtp/src/codec/index.d.ts +6 -1
- package/lib/rtp/src/codec/index.js +25 -0
- package/lib/rtp/src/codec/index.js.map +1 -1
- package/lib/rtp/src/codec/mp4a.d.ts +88 -0
- package/lib/rtp/src/codec/mp4a.js +386 -0
- package/lib/rtp/src/codec/mp4a.js.map +1 -0
- package/lib/rtp/src/codec/opus.d.ts +14 -2
- package/lib/rtp/src/codec/opus.js +32 -2
- package/lib/rtp/src/codec/opus.js.map +1 -1
- package/lib/rtp/src/codec/telephoneEvent.d.ts +102 -0
- package/lib/rtp/src/codec/telephoneEvent.js +176 -0
- package/lib/rtp/src/codec/telephoneEvent.js.map +1 -0
- package/lib/rtp/src/codec/vp8.d.ts +26 -1
- package/lib/rtp/src/codec/vp8.js +76 -2
- package/lib/rtp/src/codec/vp8.js.map +1 -1
- package/lib/rtp/src/codec/vp9.d.ts +25 -1
- package/lib/rtp/src/codec/vp9.js +64 -2
- package/lib/rtp/src/codec/vp9.js.map +1 -1
- package/lib/rtp/src/const.d.ts +1 -0
- package/lib/rtp/src/const.js +5 -0
- package/lib/rtp/src/const.js.map +1 -0
- package/lib/rtp/src/extra/container/mp4/container.js +4 -1
- package/lib/rtp/src/extra/container/mp4/container.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/h264.d.ts +26 -0
- package/lib/rtp/src/extra/container/mp4/h264.js +54 -0
- package/lib/rtp/src/extra/container/mp4/h264.js.map +1 -1
- package/lib/rtp/src/extra/container/webm/container.d.ts +1 -1
- package/lib/rtp/src/extra/container/webm/ebml/ebml.d.ts +6 -0
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js +20 -1
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js.map +1 -1
- package/lib/rtp/src/extra/processor/depacketizer.d.ts +1 -1
- package/lib/rtp/src/extra/processor/depacketizer.js +1 -1
- package/lib/rtp/src/extra/processor/depacketizer.js.map +1 -1
- package/lib/rtp/src/extra/processor/depacketizerCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/depacketizerTransformer.d.ts +1 -1
- package/lib/rtp/src/extra/processor/dtxCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/interface.d.ts +16 -11
- package/lib/rtp/src/extra/processor/interface.js.map +1 -1
- package/lib/rtp/src/extra/processor/jitterBufferCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/jitterBufferTransformer.d.ts +1 -1
- package/lib/rtp/src/extra/processor/mp4.d.ts +16 -0
- package/lib/rtp/src/extra/processor/mp4.js +55 -21
- package/lib/rtp/src/extra/processor/mp4.js.map +1 -1
- package/lib/rtp/src/extra/processor/nack.d.ts +1 -1
- package/lib/rtp/src/extra/processor/nack.js +1 -1
- package/lib/rtp/src/extra/processor/nack.js.map +1 -1
- package/lib/rtp/src/extra/processor/nackHandlerCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/ntpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/ntpTimeCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/rtcpCallback.d.ts +1 -1
- package/lib/rtp/src/extra/processor/rtcpCallback.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpCallback.d.ts +1 -1
- package/lib/rtp/src/extra/processor/rtpCallback.js +1 -1
- package/lib/rtp/src/extra/processor/rtpCallback.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpStream.d.ts +2 -2
- package/lib/rtp/src/extra/processor/rtpStream.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpTimeCallback.d.ts +1 -11
- package/lib/rtp/src/extra/processor/webm.d.ts +27 -0
- package/lib/rtp/src/extra/processor/webm.js +43 -16
- package/lib/rtp/src/extra/processor/webm.js.map +1 -1
- package/lib/rtp/src/extra/processor/webmCallback.js +6 -1
- package/lib/rtp/src/extra/processor/webmCallback.js.map +1 -1
- package/lib/rtp/src/extra/processor/webmStream.js.map +1 -1
- package/lib/rtp/src/helper.d.ts +2 -2
- package/lib/rtp/src/helper.js +2 -6
- package/lib/rtp/src/helper.js.map +1 -1
- package/lib/rtp/src/index.d.ts +4 -2
- package/lib/rtp/src/index.js +4 -2
- package/lib/rtp/src/index.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js +2 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js.map +1 -1
- package/lib/rtp/src/rtcp/rtcp.js +2 -1
- package/lib/rtp/src/rtcp/rtcp.js.map +1 -1
- package/lib/rtp/src/rtcp/sr.d.ts +4 -3
- package/lib/rtp/src/rtcp/sr.js +3 -2
- package/lib/rtp/src/rtcp/sr.js.map +1 -1
- package/lib/rtp/src/rtp/mediaClock.d.ts +283 -0
- package/lib/rtp/src/rtp/mediaClock.js +655 -0
- package/lib/rtp/src/rtp/mediaClock.js.map +1 -0
- package/lib/rtp/src/srtp/cipher/ctr.d.ts +2 -2
- package/lib/rtp/src/srtp/cipher/ctr.js +1 -1
- package/lib/rtp/src/srtp/cipher/ctr.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/gcm.d.ts +1 -1
- package/lib/rtp/src/srtp/cipher/gcm.js +1 -1
- package/lib/rtp/src/srtp/cipher/gcm.js.map +1 -1
- package/lib/rtp/src/srtp/context/context.d.ts +29 -1
- package/lib/rtp/src/srtp/context/context.js +78 -24
- package/lib/rtp/src/srtp/context/context.js.map +1 -1
- package/lib/rtp/src/srtp/context/srtp.js +23 -15
- package/lib/rtp/src/srtp/context/srtp.js.map +1 -1
- package/lib/rtp/src/util.d.ts +59 -6
- package/lib/rtp/src/util.js +88 -10
- package/lib/rtp/src/util.js.map +1 -1
- package/lib/sctp/src/index.d.ts +4 -3
- package/lib/sctp/src/index.js +10 -8
- package/lib/sctp/src/index.js.map +1 -1
- package/lib/sctp/src/sctp.d.ts +11 -2
- package/lib/sctp/src/sctp.js +47 -28
- package/lib/sctp/src/sctp.js.map +1 -1
- package/lib/webrtc/src/api/peerConfig.d.ts +264 -0
- package/lib/webrtc/src/api/peerConfig.js +250 -0
- package/lib/webrtc/src/api/peerConfig.js.map +1 -0
- package/lib/webrtc/src/api/peerConnectionEvents.d.ts +36 -0
- package/lib/webrtc/src/api/peerConnectionEvents.js +44 -0
- package/lib/webrtc/src/api/peerConnectionEvents.js.map +1 -0
- package/lib/webrtc/src/dataChannel.d.ts +1 -1
- package/lib/webrtc/src/dataChannel.js +1 -1
- package/lib/webrtc/src/dataChannel.js.map +1 -1
- package/lib/webrtc/src/index.d.ts +2 -2
- package/lib/webrtc/src/index.js +2 -2
- package/lib/webrtc/src/index.js.map +1 -1
- package/lib/webrtc/src/media/codec.d.ts +18 -0
- package/lib/webrtc/src/media/codec.js +43 -2
- package/lib/webrtc/src/media/codec.js.map +1 -1
- package/lib/webrtc/src/media/codecCompatibility.d.ts +5 -0
- package/lib/webrtc/src/media/codecCompatibility.js +15 -4
- package/lib/webrtc/src/media/codecCompatibility.js.map +1 -1
- package/lib/webrtc/src/media/index.d.ts +1 -1
- package/lib/webrtc/src/media/index.js +1 -1
- package/lib/webrtc/src/media/index.js.map +1 -1
- package/lib/webrtc/src/media/receiver/nack.js +3 -4
- package/lib/webrtc/src/media/receiver/nack.js.map +1 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.js.map +1 -1
- package/lib/webrtc/src/media/router.d.ts +116 -5
- package/lib/webrtc/src/media/router.js +281 -29
- package/lib/webrtc/src/media/router.js.map +1 -1
- package/lib/webrtc/src/media/rtpReceiver.d.ts +107 -12
- package/lib/webrtc/src/media/rtpReceiver.js +255 -28
- package/lib/webrtc/src/media/rtpReceiver.js.map +1 -1
- package/lib/webrtc/src/media/rtpSender.d.ts +56 -3
- package/lib/webrtc/src/media/rtpSender.js +180 -21
- package/lib/webrtc/src/media/rtpSender.js.map +1 -1
- package/lib/webrtc/src/media/rtpTransceiver.d.ts +94 -1
- package/lib/webrtc/src/media/rtpTransceiver.js +111 -2
- package/lib/webrtc/src/media/rtpTransceiver.js.map +1 -1
- package/lib/webrtc/src/media/sender/senderBWE.d.ts +2 -1
- package/lib/webrtc/src/media/sender/senderBWE.js +22 -10
- package/lib/webrtc/src/media/sender/senderBWE.js.map +1 -1
- package/lib/webrtc/src/media/track.d.ts +1 -1
- package/lib/webrtc/src/media/track.js +1 -1
- package/lib/webrtc/src/media/track.js.map +1 -1
- package/lib/webrtc/src/negotiation/bundleTopology.d.ts +107 -0
- package/lib/webrtc/src/negotiation/bundleTopology.js +380 -0
- package/lib/webrtc/src/negotiation/bundleTopology.js.map +1 -0
- package/lib/webrtc/src/negotiation/descriptionValidation.d.ts +51 -0
- package/lib/webrtc/src/negotiation/descriptionValidation.js +261 -0
- package/lib/webrtc/src/negotiation/descriptionValidation.js.map +1 -0
- package/lib/webrtc/src/negotiation/iceRestartRequest.d.ts +21 -0
- package/lib/webrtc/src/negotiation/iceRestartRequest.js +61 -0
- package/lib/webrtc/src/negotiation/iceRestartRequest.js.map +1 -0
- package/lib/webrtc/src/negotiation/internalState.d.ts +34 -0
- package/lib/webrtc/src/negotiation/internalState.js +21 -0
- package/lib/webrtc/src/negotiation/internalState.js.map +1 -0
- package/lib/webrtc/src/negotiation/negotiationNeeded.d.ts +44 -0
- package/lib/webrtc/src/negotiation/negotiationNeeded.js +118 -0
- package/lib/webrtc/src/negotiation/negotiationNeeded.js.map +1 -0
- package/lib/webrtc/src/negotiation/remoteCandidates.d.ts +86 -0
- package/lib/webrtc/src/negotiation/remoteCandidates.js +344 -0
- package/lib/webrtc/src/negotiation/remoteCandidates.js.map +1 -0
- package/lib/webrtc/src/negotiation/remoteMediaApplication.d.ts +71 -0
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js +398 -0
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js.map +1 -0
- package/lib/webrtc/src/negotiation/transportActivation.d.ts +59 -0
- package/lib/webrtc/src/negotiation/transportActivation.js +345 -0
- package/lib/webrtc/src/negotiation/transportActivation.js.map +1 -0
- package/lib/webrtc/src/negotiationTransaction.d.ts +233 -0
- package/lib/webrtc/src/negotiationTransaction.js +591 -0
- package/lib/webrtc/src/negotiationTransaction.js.map +1 -0
- package/lib/webrtc/src/nonstandard/dummyMedia.js +20 -6
- package/lib/webrtc/src/nonstandard/dummyMedia.js.map +1 -1
- package/lib/webrtc/src/nonstandard/index.d.ts +1 -1
- package/lib/webrtc/src/nonstandard/index.js +1 -1
- package/lib/webrtc/src/nonstandard/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/navigator.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.d.ts +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.d.ts +2 -2
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js +2 -2
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.d.ts +4 -4
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.js +61 -306
- package/lib/webrtc/src/nonstandard/userMedia/packetizer.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia.d.ts +4 -2
- package/lib/webrtc/src/nonstandard/userMedia.js +43 -9
- package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
- package/lib/webrtc/src/peerConnection.d.ts +132 -237
- package/lib/webrtc/src/peerConnection.js +971 -906
- package/lib/webrtc/src/peerConnection.js.map +1 -1
- package/lib/webrtc/src/polyfill/api.d.ts +5 -5
- package/lib/webrtc/src/polyfill/api.js.map +1 -1
- package/lib/webrtc/src/polyfill/index.js.map +1 -1
- package/lib/webrtc/src/polyfill/install.js +1 -1
- package/lib/webrtc/src/polyfill/install.js.map +1 -1
- package/lib/webrtc/src/polyfill/mediaDevices.js.map +1 -1
- package/lib/webrtc/src/polyfill/registers/mp4Webm.js.map +1 -1
- package/lib/webrtc/src/polyfill/registers/rtpRtcp.js.map +1 -1
- package/lib/webrtc/src/polyfill/selectSettings.js.map +1 -1
- package/lib/webrtc/src/polyfill/sourceIo.js.map +1 -1
- package/lib/webrtc/src/sctpManager.d.ts +66 -2
- package/lib/webrtc/src/sctpManager.js +122 -5
- package/lib/webrtc/src/sctpManager.js.map +1 -1
- package/lib/webrtc/src/sdp.js.map +1 -1
- package/lib/webrtc/src/sdpManager.d.ts +55 -11
- package/lib/webrtc/src/sdpManager.js +367 -89
- package/lib/webrtc/src/sdpManager.js.map +1 -1
- package/lib/webrtc/src/secureTransportManager.d.ts +38 -25
- package/lib/webrtc/src/secureTransportManager.js +130 -34
- package/lib/webrtc/src/secureTransportManager.js.map +1 -1
- package/lib/webrtc/src/transceiverManager.d.ts +62 -18
- package/lib/webrtc/src/transceiverManager.js +266 -105
- package/lib/webrtc/src/transceiverManager.js.map +1 -1
- package/lib/webrtc/src/transport/dtls.d.ts +11 -2
- package/lib/webrtc/src/transport/dtls.js +37 -13
- package/lib/webrtc/src/transport/dtls.js.map +1 -1
- package/lib/webrtc/src/transport/ice.d.ts +254 -7
- package/lib/webrtc/src/transport/ice.js +608 -52
- package/lib/webrtc/src/transport/ice.js.map +1 -1
- package/lib/webrtc/src/transport/iceCandidateAttribute.d.ts +98 -0
- package/lib/webrtc/src/transport/iceCandidateAttribute.js +129 -0
- package/lib/webrtc/src/transport/iceCandidateAttribute.js.map +1 -0
- package/lib/webrtc/src/transport/sctp.d.ts +4 -1
- package/lib/webrtc/src/transport/sctp.js +83 -17
- package/lib/webrtc/src/transport/sctp.js.map +1 -1
- package/lib/webrtc/src/utils.d.ts +3 -3
- package/lib/webrtc/src/utils.js +1 -1
- package/lib/webrtc/src/utils.js.map +1 -1
- package/package.json +13 -14
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { type PeerConfig, type RTCPeerConnectionConfig } from "./api/peerConfig";
|
|
2
|
+
import { type RTCDataChannelEvent, type RTCPeerConnectionIceEvent, RTCTrackEvent } from "./api/peerConnectionEvents";
|
|
1
3
|
import type { RTCDataChannel } from "./dataChannel";
|
|
2
4
|
import { EventTarget } from "./helper";
|
|
3
|
-
import {
|
|
4
|
-
import type
|
|
5
|
-
import { type MediaStream, type MediaStreamTrack, type RTCRtpCodecParameters, type RTCRtpHeaderExtensionParameters, type RTCRtpReceiver, type RTCRtpSender, type RTCRtpSenderOptions, type RTCRtpTransceiver, type TransceiverOptions } from "./media";
|
|
5
|
+
import { Event } from "./imports/common";
|
|
6
|
+
import { type MediaStream, type MediaStreamTrack, type RTCRtpCodecParameters, type RTCRtpSender, type RTCRtpTransceiver, type TransceiverOptions } from "./media";
|
|
6
7
|
import { type RTCStatsReport } from "./media/stats";
|
|
7
|
-
import { type
|
|
8
|
-
import { type
|
|
9
|
-
import type {
|
|
8
|
+
import { type RTCSessionDescription, SessionDescription } from "./sdp";
|
|
9
|
+
import { type RTCSessionDescriptionInit } from "./sdpManager";
|
|
10
|
+
import type { RTCDtlsTransport } from "./transport/dtls";
|
|
10
11
|
import type { RTCIceCandidate, RTCIceCandidateInit, RTCIceTransport } from "./transport/ice";
|
|
11
|
-
import { type RTCSctpTransport } from "./transport/sctp";
|
|
12
12
|
import type { Kind, RTCSignalingState } from "./types/domain";
|
|
13
13
|
import type { Callback, CallbackWithValue } from "./types/util";
|
|
14
|
+
export { type DebugConfig, defaultPeerConfig, findCodecByMimeType, type PeerConfig, type RTCBundlePolicy, type RTCConfiguration, type RTCIceServer, type RTCPeerConnectionConfig, type RTCRtcpMuxPolicy, type RTCSctpConfiguration, } from "./api/peerConfig";
|
|
15
|
+
export { type RTCDataChannelEvent, type RTCPeerConnectionIceEvent, RTCTrackEvent, } from "./api/peerConnectionEvents";
|
|
14
16
|
/**
|
|
15
17
|
* W3C compatibility notes kept near the public RTCPeerConnection surface so the
|
|
16
18
|
* reviewable diff does not depend on external PR text.
|
|
@@ -39,31 +41,51 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
39
41
|
readonly cname: string;
|
|
40
42
|
config: Required<PeerConfig>;
|
|
41
43
|
signalingState: RTCSignalingState;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
private pendingOfferChangeSeq?;
|
|
51
|
-
private lastCreatedOfferChangeSeq;
|
|
52
|
-
needRestart: boolean;
|
|
44
|
+
private readonly negotiationNeed;
|
|
45
|
+
private readonly iceRestartRequest;
|
|
46
|
+
/** W3C [[NegotiationNeeded]]. */
|
|
47
|
+
get negotiationneeded(): boolean;
|
|
48
|
+
set negotiationneeded(value: boolean);
|
|
49
|
+
/** A `restartIce()` request that no committed negotiation satisfied yet. */
|
|
50
|
+
get needRestart(): boolean;
|
|
51
|
+
set needRestart(value: boolean);
|
|
53
52
|
private readonly router;
|
|
54
53
|
private readonly sdpManager;
|
|
55
54
|
private readonly transceiverManager;
|
|
56
55
|
private readonly sctpManager;
|
|
57
56
|
private readonly secureManager;
|
|
57
|
+
private readonly negotiation;
|
|
58
|
+
private readonly topology;
|
|
59
|
+
private readonly remoteCandidates;
|
|
60
|
+
private readonly validator;
|
|
61
|
+
private readonly remoteMedia;
|
|
62
|
+
private readonly activation;
|
|
58
63
|
private isClosed;
|
|
59
|
-
private
|
|
64
|
+
private applyingIceRestart;
|
|
65
|
+
/**
|
|
66
|
+
* The last operation of the chain: `done` when it finished, `applied` when
|
|
67
|
+
* the description it applies is in place (setLocalDescription's gathering
|
|
68
|
+
* wait comes after it). addIceCandidate only needs `applied`.
|
|
69
|
+
*/
|
|
70
|
+
private descriptionTail;
|
|
71
|
+
/** Marks the running operation's description as applied (see descriptionTail). */
|
|
72
|
+
private markDescriptionApplied;
|
|
60
73
|
private lastCreatedAnswer?;
|
|
74
|
+
/** Reusable by a parameterless setLocalDescription while still valid. */
|
|
61
75
|
private lastCreatedOffer?;
|
|
62
|
-
|
|
76
|
+
/**
|
|
77
|
+
* W3C [[LastCreatedOffer]] and its generation record: the SDP of this
|
|
78
|
+
* peer's latest createOffer and the transceiver each of its MIDs was
|
|
79
|
+
* created for. Only createOffer replaces it; an explicit local offer must
|
|
80
|
+
* match the SDP. Applying the offer takes the MIDs from the SDP and this
|
|
81
|
+
* record (never from state kept elsewhere); its ICE restart generations are
|
|
82
|
+
* registered on the transports (see RTCIceTransport.localGenerationFor).
|
|
83
|
+
*/
|
|
84
|
+
private createdOffer?;
|
|
63
85
|
readonly iceGatheringStateChange: Event<["complete" | "new" | "gathering"]>;
|
|
64
|
-
readonly iceConnectionStateChange: Event<["closed" | "
|
|
86
|
+
readonly iceConnectionStateChange: Event<["closed" | "new" | "connected" | "disconnected" | "completed" | "failed" | "checking"]>;
|
|
65
87
|
readonly signalingStateChange: Event<["closed" | "stable" | "have-local-offer" | "have-remote-offer" | "have-local-pranswer" | "have-remote-pranswer"]>;
|
|
66
|
-
readonly connectionStateChange: Event<["closed" | "
|
|
88
|
+
readonly connectionStateChange: Event<["closed" | "new" | "connected" | "connecting" | "disconnected" | "failed"]>;
|
|
67
89
|
readonly onDataChannel: Event<[RTCDataChannel]>;
|
|
68
90
|
readonly onRemoteTransceiverAdded: Event<[RTCRtpTransceiver]>;
|
|
69
91
|
readonly onTransceiverAdded: Event<[RTCRtpTransceiver]>;
|
|
@@ -90,13 +112,13 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
90
112
|
get oniceconnectionstatechange(): Callback | null;
|
|
91
113
|
set oniceconnectionstatechange(value: Callback | null);
|
|
92
114
|
constructor(config?: RTCPeerConnectionConfig);
|
|
93
|
-
get connectionState(): "closed" | "
|
|
94
|
-
get iceConnectionState(): "closed" | "
|
|
115
|
+
get connectionState(): "closed" | "new" | "connected" | "connecting" | "disconnected" | "failed";
|
|
116
|
+
get iceConnectionState(): "closed" | "new" | "connected" | "disconnected" | "completed" | "failed" | "checking";
|
|
95
117
|
get iceGathererState(): "complete" | "new" | "gathering";
|
|
96
118
|
get iceGatheringState(): "complete" | "new" | "gathering";
|
|
97
119
|
get dtlsTransports(): RTCDtlsTransport[];
|
|
98
|
-
get sctpTransport(): RTCSctpTransport | undefined;
|
|
99
|
-
get sctp(): RTCSctpTransport | null;
|
|
120
|
+
get sctpTransport(): import(".").RTCSctpTransport | undefined;
|
|
121
|
+
get sctp(): import(".").RTCSctpTransport | null;
|
|
100
122
|
get sctpRemotePort(): number | undefined;
|
|
101
123
|
get iceTransports(): RTCIceTransport[];
|
|
102
124
|
get extIdUriMap(): {
|
|
@@ -110,14 +132,14 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
110
132
|
get currentRemoteDescription(): RTCSessionDescription | null;
|
|
111
133
|
get pendingRemoteDescription(): RTCSessionDescription | null;
|
|
112
134
|
get canTrickleIceCandidates(): boolean | null;
|
|
113
|
-
get remoteIsBundled(): GroupDescription | undefined;
|
|
135
|
+
get remoteIsBundled(): import("./sdp").GroupDescription | undefined;
|
|
114
136
|
/**@private */
|
|
115
137
|
get _localDescription(): SessionDescription | undefined;
|
|
116
138
|
/**@private */
|
|
117
139
|
get _remoteDescription(): SessionDescription | undefined;
|
|
118
140
|
getTransceivers(): RTCRtpTransceiver[];
|
|
119
141
|
getSenders(): RTCRtpSender[];
|
|
120
|
-
getReceivers(): RTCRtpReceiver[];
|
|
142
|
+
getReceivers(): import("./media").RTCRtpReceiver[];
|
|
121
143
|
setConfiguration(config: RTCPeerConnectionConfig): void;
|
|
122
144
|
getConfiguration(): {
|
|
123
145
|
codecs: {
|
|
@@ -125,8 +147,8 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
125
147
|
video: RTCRtpCodecParameters[] | undefined;
|
|
126
148
|
};
|
|
127
149
|
headerExtensions: {
|
|
128
|
-
audio: RTCRtpHeaderExtensionParameters[] | undefined;
|
|
129
|
-
video: RTCRtpHeaderExtensionParameters[] | undefined;
|
|
150
|
+
audio: import("./media").RTCRtpHeaderExtensionParameters[] | undefined;
|
|
151
|
+
video: import("./media").RTCRtpHeaderExtensionParameters[] | undefined;
|
|
130
152
|
};
|
|
131
153
|
iceServers: {
|
|
132
154
|
urls: string | string[];
|
|
@@ -136,9 +158,9 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
136
158
|
icePortRange: [number, number] | undefined;
|
|
137
159
|
iceAdditionalHostAddresses: string[] | undefined;
|
|
138
160
|
dtls: {
|
|
139
|
-
keys?: DtlsKeys | undefined;
|
|
161
|
+
keys?: import(".").DtlsKeys | undefined;
|
|
140
162
|
};
|
|
141
|
-
certificates: RTCCertificate[];
|
|
163
|
+
certificates: import(".").RTCCertificate[];
|
|
142
164
|
debug: {
|
|
143
165
|
inboundPacketLoss?: number | undefined;
|
|
144
166
|
outboundPacketLoss?: number | undefined;
|
|
@@ -154,59 +176,40 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
154
176
|
maxLength?: number;
|
|
155
177
|
};
|
|
156
178
|
iceTransportPolicy: "all" | "relay";
|
|
157
|
-
/** Advertise local ICE lite and operate in the controlled role. */
|
|
158
179
|
iceLite: boolean;
|
|
159
|
-
iceInterfaceAddresses: InterfaceAddresses | undefined;
|
|
180
|
+
iceInterfaceAddresses: import(".").InterfaceAddresses | undefined;
|
|
160
181
|
iceUseIpv4: boolean;
|
|
161
182
|
iceUseIpv6: boolean;
|
|
162
183
|
iceUseTcp: boolean;
|
|
163
|
-
/** Gather passive (listening) TCP host candidates. Defaults to true. */
|
|
164
184
|
iceTcpPassive: boolean;
|
|
165
|
-
/**
|
|
166
|
-
* Seconds to wait for server-reflexive candidates while gathering.
|
|
167
|
-
* Defaults to 5 when undefined.
|
|
168
|
-
*/
|
|
169
185
|
iceStunGatherTimeout: number | undefined;
|
|
170
|
-
/**
|
|
171
|
-
* Seconds to wait for a TURN TCP/TLS connection to be established.
|
|
172
|
-
* Defaults to 8 when undefined.
|
|
173
|
-
*/
|
|
174
186
|
iceTurnConnectTimeout: number | undefined;
|
|
175
187
|
turnTransport: "udp" | "tcp" | "tls" | undefined;
|
|
176
|
-
turnTlsOptions: TlsConnectionOptions | undefined;
|
|
177
|
-
/**
|
|
178
|
-
* Preferred IP family of the TURN/UDP socket, applied only when the TURN
|
|
179
|
-
* server is a hostname. Ignored for an IP literal server, whose own family
|
|
180
|
-
* always selects the socket. Defaults to 4 when undefined.
|
|
181
|
-
*/
|
|
188
|
+
turnTlsOptions: import(".").TlsConnectionOptions | undefined;
|
|
182
189
|
turnUdpFamily: 4 | 6 | undefined;
|
|
183
|
-
/** @deprecated Prefer turn URL transport parameters or turnTransport. */
|
|
184
190
|
forceTurnTCP: boolean;
|
|
185
|
-
/** such as google cloud run */
|
|
186
191
|
iceUseLinkLocalAddress: boolean | undefined;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
iceFilterStunResponse: ((message: Message, addr: Address, protocol: Protocol) => boolean) | undefined;
|
|
190
|
-
iceFilterCandidatePair: ((pair: CandidatePair) => boolean) | undefined;
|
|
192
|
+
iceFilterStunResponse: ((message: import(".").Message, addr: import(".").Address, protocol: import(".").Protocol) => boolean) | undefined;
|
|
193
|
+
iceFilterCandidatePair: ((pair: import(".").CandidatePair) => boolean) | undefined;
|
|
191
194
|
icePasswordPrefix: string | undefined;
|
|
192
|
-
bundlePolicy: BundlePolicy;
|
|
195
|
+
bundlePolicy: import("./sdp").BundlePolicy;
|
|
193
196
|
rtcpMuxPolicy: "require";
|
|
194
197
|
iceCandidatePoolSize: number;
|
|
195
198
|
midSuffix: boolean;
|
|
196
|
-
/** Advertised local SCTP max-message-size in SDP. Use 0 for unlimited. */
|
|
197
199
|
maxMessageSize: number;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
* - `"compatible"` (default): an accepted `inactive` m-line keeps a non-zero port.
|
|
201
|
-
* Only rejected (no common codec / remote port 0) or stopped m-lines use port 0,
|
|
202
|
-
* and only those negotiated port 0 positions are reused by new transceivers.
|
|
203
|
-
* - `"aggressive"`: legacy behavior. `inactive` m-lines are also written with port 0.
|
|
204
|
-
*/
|
|
205
|
-
mLineReuse: MLineReuse;
|
|
200
|
+
mLineReuse: import("./sdpManager").MLineReuse;
|
|
201
|
+
keyFrameRequestRouting: import("./media").KeyFrameRequestRouting;
|
|
206
202
|
};
|
|
207
|
-
|
|
203
|
+
/**
|
|
204
|
+
* W3C operations chain: createOffer runs after every earlier description
|
|
205
|
+
* operation, so an offer it produces cannot invalidate a setLocalDescription
|
|
206
|
+
* that was called before it.
|
|
207
|
+
*/
|
|
208
|
+
createOffer(options?: {
|
|
208
209
|
iceRestart?: boolean;
|
|
209
210
|
}): Promise<RTCSessionDescription>;
|
|
211
|
+
/** createOffer body; call directly only from inside a queued operation. */
|
|
212
|
+
private createOfferNow;
|
|
210
213
|
private createSctpTransport;
|
|
211
214
|
createDataChannel(label: string, options?: Partial<{
|
|
212
215
|
maxPacketLifeTime?: number;
|
|
@@ -219,20 +222,27 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
219
222
|
removeTrack(sender: RTCRtpSender): void;
|
|
220
223
|
/**交渉が必要な変更を記録し、negotiationneeded を予約する */
|
|
221
224
|
private needNegotiation;
|
|
222
|
-
/**未交渉の変更が残っていれば negotiationneeded を予約する (stable 復帰時の再判定にも使う) */
|
|
223
|
-
private scheduleNegotiationneeded;
|
|
224
|
-
private invalidateLastCreatedDescriptions;
|
|
225
|
-
private waitForPendingDescriptionTask;
|
|
226
|
-
private findOrCreateTransport;
|
|
227
225
|
/**
|
|
228
|
-
*
|
|
229
|
-
*
|
|
226
|
+
* The transceiver each audio / video m-line of a local offer associates:
|
|
227
|
+
* the one with that MID, or the one the offer's generation record created
|
|
228
|
+
* the MID for while it is still unassociated (an offer created while a
|
|
229
|
+
* remote offer was pending, or one whose rollback took the MID back).
|
|
230
230
|
*/
|
|
231
|
-
private
|
|
231
|
+
private planOfferAssignments;
|
|
232
|
+
private selectDescribedIceGenerations;
|
|
233
|
+
private invalidateLastCreatedDescriptions;
|
|
234
|
+
private waitForPendingDescriptionTask;
|
|
232
235
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
236
|
+
* W3C "chain an operation", in one place: an operation registered on a
|
|
237
|
+
* closed connection is rejected at once; one that close() overtook while
|
|
238
|
+
* it waited for the previous operation, or while it ran, is rejected with
|
|
239
|
+
* InvalidStateError when it resumes. Every operation's promise settles
|
|
240
|
+
* (W3C would leave an overtaken one pending forever; werift settles it so
|
|
241
|
+
* an application awaiting it is never stuck).
|
|
235
242
|
*/
|
|
243
|
+
private enqueueDescriptionOperation;
|
|
244
|
+
private findOrCreateTransport;
|
|
245
|
+
/**Resolve candidate metadata from an accepted m-line that owns this transport. */
|
|
236
246
|
private resolveLocalCandidateOwner;
|
|
237
247
|
/**
|
|
238
248
|
* answer 確定後の stopping transceiver を整理する。
|
|
@@ -241,189 +251,74 @@ export declare class RTCPeerConnection extends EventTarget {
|
|
|
241
251
|
private settleStoppingTransceivers;
|
|
242
252
|
/**停止した transceiver の transport のうち、live な利用者がいないものを閉じる */
|
|
243
253
|
private closeIdleTransports;
|
|
254
|
+
/**
|
|
255
|
+
* Applying a created description is built only from its SDP and its
|
|
256
|
+
* generation record (`createdOffer`, the ICE generations registered on the
|
|
257
|
+
* transports), never from state kept elsewhere, so a description may be
|
|
258
|
+
* applied later or again (after other descriptions were created, after a
|
|
259
|
+
* rollback, as a replacement). First the proposal: parse, plan the MID /
|
|
260
|
+
* m-line assignments, validate every m-line's credentials against its
|
|
261
|
+
* transport and stage the transports the topology needs. Only after all of
|
|
262
|
+
* that passed are pending descriptions retired, assignments written and
|
|
263
|
+
* each transport switched to the generation the SDP carries, so a failure
|
|
264
|
+
* leaves the peer exactly as it was.
|
|
265
|
+
*/
|
|
244
266
|
setLocalDescription(sessionDescription: {
|
|
245
267
|
type: "rollback";
|
|
246
268
|
}): Promise<void>;
|
|
247
269
|
setLocalDescription(sessionDescription?: RTCLocalSessionDescriptionInit): Promise<SessionDescription>;
|
|
248
270
|
private gatherCandidates;
|
|
271
|
+
/**
|
|
272
|
+
* The local answer commits the codecs it answered for every live media
|
|
273
|
+
* m-line of the remote offer: the sender, the receive codec / RTX tables, the
|
|
274
|
+
* remote track codec and TWCC switch now, whatever changed them (a codec
|
|
275
|
+
* preference, the remote offer or the payload types it uses). Pending
|
|
276
|
+
* descriptions only added receive keys; the commit replaces the tables.
|
|
277
|
+
*/
|
|
278
|
+
private commitAnsweredCodecs;
|
|
279
|
+
/** Always called on answer; see commitIceRestartIfAnyStaged on secureManager for why this is unconditional. */
|
|
280
|
+
private commitIceRestartIfAnyStaged;
|
|
249
281
|
addIceCandidate(candidateMessage?: RTCIceCandidate | RTCIceCandidateInit | null): Promise<void>;
|
|
250
|
-
private applyRemoteIceCandidate;
|
|
251
|
-
private flushPendingRemoteCandidates;
|
|
252
|
-
private connect;
|
|
253
282
|
restartIce(): void;
|
|
254
283
|
setRemoteDescription(sessionDescription: RTCSessionDescriptionInit): Promise<void>;
|
|
255
284
|
/**
|
|
256
|
-
* remote
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* group の記述が MID と一致しなくても remote の ICE credentials が同じなら、同じ transport のまま扱う。
|
|
261
|
-
*/
|
|
262
|
-
private assertAnswerKeepsSharedTransports;
|
|
263
|
-
/**
|
|
264
|
-
* remote m-line に対応する transceiver を探す。MID の一致を優先し、
|
|
265
|
-
* 未関連付け transceiver は同じ offer 内で異なる m-line に割り当てる。
|
|
285
|
+
* The committed remote description now lies on the committed transports.
|
|
286
|
+
* A generation that already ended on one of them is ended for every
|
|
287
|
+
* m-line it carries there too, also one the proposal had split off but
|
|
288
|
+
* that the answer kept on the same transport.
|
|
266
289
|
*/
|
|
267
|
-
private
|
|
290
|
+
private completeEndedCurrentGenerations;
|
|
268
291
|
/**
|
|
269
|
-
* remote
|
|
270
|
-
*
|
|
292
|
+
* remote description の transport 所有で使う独立 transport (別 ICE credentials) を作る。
|
|
293
|
+
* rollback で使われなくなれば transaction が閉じる。
|
|
271
294
|
*/
|
|
272
|
-
private
|
|
295
|
+
private createOwnerTransport;
|
|
273
296
|
addTransceiver(trackOrKind: Kind | MediaStreamTrack, options?: Partial<TransceiverOptions>): RTCRtpTransceiver;
|
|
274
297
|
addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender;
|
|
298
|
+
/** W3C operations chain: createAnswer is ordered with SLD/SRD calls. */
|
|
275
299
|
createAnswer(): Promise<RTCSessionDescription>;
|
|
300
|
+
/** createAnswer body; call directly only from inside a queued operation. */
|
|
301
|
+
private createAnswerNow;
|
|
302
|
+
/**
|
|
303
|
+
* A description operation resumes after an await or after an event it
|
|
304
|
+
* fired: when close() ran in the meantime (an event handler, a timer) it
|
|
305
|
+
* stops before changing anything, and the operation fails with
|
|
306
|
+
* InvalidStateError (W3C).
|
|
307
|
+
*/
|
|
308
|
+
private assertOpenAfterYield;
|
|
276
309
|
private assertNotClosed;
|
|
277
310
|
private setSignalingState;
|
|
278
311
|
private createPeerConnectionStats;
|
|
279
312
|
getStats(selector?: MediaStreamTrack | null): Promise<RTCStatsReport>;
|
|
280
|
-
close(): Promise<void>;
|
|
281
|
-
private completePeerEvents;
|
|
282
|
-
}
|
|
283
|
-
export type DebugConfig = Partial<{
|
|
284
|
-
/**% */
|
|
285
|
-
inboundPacketLoss: number;
|
|
286
|
-
/**% */
|
|
287
|
-
outboundPacketLoss: number;
|
|
288
|
-
/**ms */
|
|
289
|
-
receiverReportDelay: number;
|
|
290
|
-
disableSendNack: boolean;
|
|
291
|
-
disableRecvRetransmit: boolean;
|
|
292
|
-
}>;
|
|
293
|
-
export interface PeerConfig {
|
|
294
|
-
codecs: Partial<{
|
|
295
|
-
/**
|
|
296
|
-
* When specifying a codec with a fixed payloadType such as PCMU,
|
|
297
|
-
* it is necessary to set the correct PayloadType in RTCRtpCodecParameters in advance.
|
|
298
|
-
*/
|
|
299
|
-
audio: RTCRtpCodecParameters[];
|
|
300
|
-
video: RTCRtpCodecParameters[];
|
|
301
|
-
}>;
|
|
302
|
-
headerExtensions: Partial<{
|
|
303
|
-
audio: RTCRtpHeaderExtensionParameters[];
|
|
304
|
-
video: RTCRtpHeaderExtensionParameters[];
|
|
305
|
-
}>;
|
|
306
|
-
iceTransportPolicy: "all" | "relay";
|
|
307
|
-
/** Advertise local ICE lite and operate in the controlled role. */
|
|
308
|
-
iceLite: boolean;
|
|
309
|
-
iceServers: RTCIceServer[];
|
|
310
|
-
/**Minimum port and Maximum port must not be the same value */
|
|
311
|
-
icePortRange: [number, number] | undefined;
|
|
312
|
-
iceInterfaceAddresses: InterfaceAddresses | undefined;
|
|
313
|
-
/** Add additional host (local) addresses to use for candidate gathering.
|
|
314
|
-
* Notably, you can include hosts that are normally excluded, such as loopback, tun interfaces, etc.
|
|
315
|
-
*/
|
|
316
|
-
iceAdditionalHostAddresses: string[] | undefined;
|
|
317
|
-
iceUseIpv4: boolean;
|
|
318
|
-
iceUseIpv6: boolean;
|
|
319
|
-
iceUseTcp: boolean;
|
|
320
|
-
/** Gather passive (listening) TCP host candidates. Defaults to true. */
|
|
321
|
-
iceTcpPassive: boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Seconds to wait for server-reflexive candidates while gathering.
|
|
324
|
-
* Defaults to 5 when undefined.
|
|
325
|
-
*/
|
|
326
|
-
iceStunGatherTimeout: number | undefined;
|
|
327
|
-
/**
|
|
328
|
-
* Seconds to wait for a TURN TCP/TLS connection to be established.
|
|
329
|
-
* Defaults to 8 when undefined.
|
|
330
|
-
*/
|
|
331
|
-
iceTurnConnectTimeout: number | undefined;
|
|
332
|
-
turnTransport: "udp" | "tcp" | "tls" | undefined;
|
|
333
|
-
turnTlsOptions: TlsConnectionOptions | undefined;
|
|
334
|
-
/**
|
|
335
|
-
* Preferred IP family of the TURN/UDP socket, applied only when the TURN
|
|
336
|
-
* server is a hostname. Ignored for an IP literal server, whose own family
|
|
337
|
-
* always selects the socket. Defaults to 4 when undefined.
|
|
338
|
-
*/
|
|
339
|
-
turnUdpFamily: 4 | 6 | undefined;
|
|
340
|
-
/** @deprecated Prefer turn URL transport parameters or turnTransport. */
|
|
341
|
-
forceTurnTCP: boolean;
|
|
342
|
-
/** such as google cloud run */
|
|
343
|
-
iceUseLinkLocalAddress: boolean | undefined;
|
|
344
|
-
/** If provided, is called on each STUN request.
|
|
345
|
-
* Return `true` if a STUN response should be sent, false if it should be skipped. */
|
|
346
|
-
iceFilterStunResponse: ((message: Message, addr: Address, protocol: Protocol) => boolean) | undefined;
|
|
347
|
-
iceFilterCandidatePair: ((pair: CandidatePair) => boolean) | undefined;
|
|
348
|
-
dtls: Partial<{
|
|
349
|
-
keys: DtlsKeys;
|
|
350
|
-
}>;
|
|
351
|
-
icePasswordPrefix: string | undefined;
|
|
352
|
-
bundlePolicy: BundlePolicy;
|
|
353
|
-
rtcpMuxPolicy: "require";
|
|
354
|
-
iceCandidatePoolSize: number;
|
|
355
|
-
certificates: RTCCertificate[];
|
|
356
|
-
debug: DebugConfig;
|
|
357
|
-
midSuffix: boolean;
|
|
358
|
-
/** Advertised local SCTP max-message-size in SDP. Use 0 for unlimited. */
|
|
359
|
-
maxMessageSize: number;
|
|
360
|
-
/** SCTP outbound packet MTU used for DATA chunk fragmentation. */
|
|
361
|
-
sctp: {
|
|
362
|
-
mtu: number;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* Queue outbound RTP on each sender until DTLS is connected.
|
|
366
|
-
* Disabled by default. Pass `true` or `{ enabled: true, maxLength }` to buffer.
|
|
367
|
-
*/
|
|
368
|
-
pendingRtp: NonNullable<RTCRtpSenderOptions["pendingRtp"]>;
|
|
369
313
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* - `"aggressive"`: legacy behavior. `inactive` m-lines are also written with port 0.
|
|
314
|
+
* `"closed"` is final: a description operation that close() overtook
|
|
315
|
+
* rejects with InvalidStateError and changes nothing more, and every
|
|
316
|
+
* transport only the negotiation holds (proposal, pending-only, prepared)
|
|
317
|
+
* stops with the live ones.
|
|
375
318
|
*/
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
export declare const findCodecByMimeType: (codecs: RTCRtpCodecParameters[], target: RTCRtpCodecParameters) => RTCRtpCodecParameters | undefined;
|
|
379
|
-
export type RTCIceServer = {
|
|
380
|
-
urls: string | string[];
|
|
381
|
-
username?: string;
|
|
382
|
-
credential?: string;
|
|
383
|
-
};
|
|
384
|
-
export type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle";
|
|
385
|
-
export type RTCRtcpMuxPolicy = "require";
|
|
386
|
-
export interface RTCSctpConfiguration {
|
|
387
|
-
/** SCTP outbound packet MTU used for DATA chunk fragmentation. Defaults to 1191. */
|
|
388
|
-
mtu?: number;
|
|
389
|
-
}
|
|
390
|
-
export interface RTCConfiguration {
|
|
391
|
-
iceServers?: RTCIceServer[];
|
|
392
|
-
iceTransportPolicy?: PeerConfig["iceTransportPolicy"];
|
|
393
|
-
bundlePolicy?: RTCBundlePolicy;
|
|
394
|
-
rtcpMuxPolicy?: RTCRtcpMuxPolicy;
|
|
395
|
-
iceCandidatePoolSize?: number;
|
|
396
|
-
certificates?: RTCCertificate[];
|
|
319
|
+
close(): Promise<void>;
|
|
320
|
+
private completePeerEvents;
|
|
397
321
|
}
|
|
398
322
|
export interface RTCLocalSessionDescriptionInit extends RTCSessionDescriptionInit {
|
|
399
323
|
type?: Exclude<RTCSessionDescriptionInit["type"], "rollback"> | "rollback";
|
|
400
324
|
}
|
|
401
|
-
type RTCPeerConnectionRTCConfiguration = Omit<RTCConfiguration, "bundlePolicy"> & {
|
|
402
|
-
bundlePolicy?: PeerConfig["bundlePolicy"] | RTCBundlePolicy;
|
|
403
|
-
};
|
|
404
|
-
export type RTCPeerConnectionConfig = Partial<Omit<PeerConfig, "bundlePolicy" | "rtcpMuxPolicy" | "iceCandidatePoolSize" | "certificates" | "sctp">> & RTCPeerConnectionRTCConfiguration & {
|
|
405
|
-
sctp?: RTCSctpConfiguration;
|
|
406
|
-
};
|
|
407
|
-
export declare const defaultPeerConfig: PeerConfig;
|
|
408
|
-
export declare class RTCTrackEvent {
|
|
409
|
-
readonly type = "track";
|
|
410
|
-
readonly track: MediaStreamTrack;
|
|
411
|
-
readonly streams: MediaStream[];
|
|
412
|
-
readonly transceiver: RTCRtpTransceiver;
|
|
413
|
-
readonly receiver: RTCRtpReceiver;
|
|
414
|
-
constructor(init: {
|
|
415
|
-
track: MediaStreamTrack;
|
|
416
|
-
streams: MediaStream[];
|
|
417
|
-
transceiver: RTCRtpTransceiver;
|
|
418
|
-
receiver: RTCRtpReceiver;
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
export interface RTCDataChannelEvent {
|
|
422
|
-
type?: "datachannel";
|
|
423
|
-
channel: RTCDataChannel;
|
|
424
|
-
}
|
|
425
|
-
export interface RTCPeerConnectionIceEvent {
|
|
426
|
-
type?: "icecandidate";
|
|
427
|
-
candidate?: RTCIceCandidate;
|
|
428
|
-
}
|
|
429
|
-
export {};
|