@lakutata/webrtc 0.0.0-stage → 3.1.1
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/LICENSE +23 -0
- package/README.md +509 -2
- package/README.zh-CN.md +399 -0
- package/THIRD_PARTY_NOTICES.md +652 -0
- package/dist/cjs/client/SignalingConnection.d.ts +81 -0
- package/dist/cjs/client/SignalingConnection.js +67 -0
- package/dist/cjs/cluster/Cluster.d.ts +503 -0
- package/dist/cjs/cluster/Cluster.js +546 -0
- package/dist/cjs/cluster/ClusterFrames.d.ts +24 -0
- package/dist/cjs/cluster/ClusterFrames.js +90 -0
- package/dist/cjs/cluster/ClusterTURN.d.ts +63 -0
- package/dist/cjs/cluster/ClusterTURN.js +78 -0
- package/dist/cjs/cluster/Rendezvous.d.ts +8 -0
- package/dist/cjs/cluster/Rendezvous.js +23 -0
- package/dist/cjs/cluster/transports/ClusterTransport.d.ts +34 -0
- package/dist/cjs/cluster/transports/ClusterTransport.js +2 -0
- package/dist/cjs/cluster/transports/LoadClient.d.ts +6 -0
- package/dist/cjs/cluster/transports/LoadClient.js +80 -0
- package/dist/cjs/cluster/transports/MemoryClusterTransport.d.ts +13 -0
- package/dist/cjs/cluster/transports/MemoryClusterTransport.js +47 -0
- package/dist/cjs/cluster/transports/NATSClusterTransport.d.ts +23 -0
- package/dist/cjs/cluster/transports/NATSClusterTransport.js +70 -0
- package/dist/cjs/cluster/transports/RedisClusterTransport.d.ts +23 -0
- package/dist/cjs/cluster/transports/RedisClusterTransport.js +77 -0
- package/dist/cjs/exceptions/ClusterRequestException.d.ts +11 -0
- package/dist/cjs/exceptions/ClusterRequestException.js +18 -0
- package/dist/cjs/exceptions/ClusterTimeoutException.d.ts +10 -0
- package/dist/cjs/exceptions/ClusterTimeoutException.js +17 -0
- package/dist/cjs/exceptions/ClusterTransportNotFoundException.d.ts +11 -0
- package/dist/cjs/exceptions/ClusterTransportNotFoundException.js +18 -0
- package/dist/cjs/exceptions/SignalingClientRequiredException.d.ts +12 -0
- package/dist/cjs/exceptions/SignalingClientRequiredException.js +19 -0
- package/dist/cjs/exceptions/SignalingConnectionException.d.ts +12 -0
- package/dist/cjs/exceptions/SignalingConnectionException.js +19 -0
- package/dist/cjs/exceptions/SignalingDeniedException.d.ts +11 -0
- package/dist/cjs/exceptions/SignalingDeniedException.js +18 -0
- package/dist/cjs/exceptions/SignalingLimitException.d.ts +11 -0
- package/dist/cjs/exceptions/SignalingLimitException.js +18 -0
- package/dist/cjs/exceptions/SignalingNotAMemberException.d.ts +11 -0
- package/dist/cjs/exceptions/SignalingNotAMemberException.js +18 -0
- package/dist/cjs/exceptions/WHEPDeniedException.d.ts +15 -0
- package/dist/cjs/exceptions/WHEPDeniedException.js +22 -0
- package/dist/cjs/exceptions/WHEPLimitException.d.ts +15 -0
- package/dist/cjs/exceptions/WHEPLimitException.js +22 -0
- package/dist/cjs/exceptions/WHEPMediaTypeException.d.ts +15 -0
- package/dist/cjs/exceptions/WHEPMediaTypeException.js +22 -0
- package/dist/cjs/exceptions/WHEPOfferException.d.ts +16 -0
- package/dist/cjs/exceptions/WHEPOfferException.js +23 -0
- package/dist/cjs/exceptions/WHEPSessionNotFoundException.d.ts +15 -0
- package/dist/cjs/exceptions/WHEPSessionNotFoundException.js +22 -0
- package/dist/cjs/exceptions/WHIPDeniedException.d.ts +15 -0
- package/dist/cjs/exceptions/WHIPDeniedException.js +22 -0
- package/dist/cjs/exceptions/WHIPLimitException.d.ts +15 -0
- package/dist/cjs/exceptions/WHIPLimitException.js +22 -0
- package/dist/cjs/exceptions/WHIPMediaTypeException.d.ts +15 -0
- package/dist/cjs/exceptions/WHIPMediaTypeException.js +22 -0
- package/dist/cjs/exceptions/WHIPOfferException.d.ts +16 -0
- package/dist/cjs/exceptions/WHIPOfferException.js +23 -0
- package/dist/cjs/exceptions/WHIPSessionNotFoundException.d.ts +15 -0
- package/dist/cjs/exceptions/WHIPSessionNotFoundException.js +22 -0
- package/dist/cjs/exports/Client.d.ts +11 -0
- package/dist/cjs/exports/Client.js +29 -0
- package/dist/cjs/exports/WebRTC.d.ts +48 -0
- package/dist/cjs/exports/WebRTC.js +72 -0
- package/dist/cjs/lib/common/binary.d.ts +51 -0
- package/dist/cjs/lib/common/binary.js +264 -0
- package/dist/cjs/lib/common/binaryData.d.ts +116 -0
- package/dist/cjs/lib/common/binaryData.js +400 -0
- package/dist/cjs/lib/common/crc.d.ts +4 -0
- package/dist/cjs/lib/common/crc.js +122 -0
- package/dist/cjs/lib/common/deque.d.ts +36 -0
- package/dist/cjs/lib/common/deque.js +89 -0
- package/dist/cjs/lib/common/event.d.ts +48 -0
- package/dist/cjs/lib/common/event.js +207 -0
- package/dist/cjs/lib/common/index.d.ts +11 -0
- package/dist/cjs/lib/common/index.js +50 -0
- package/dist/cjs/lib/common/log.d.ts +47 -0
- package/dist/cjs/lib/common/log.js +62 -0
- package/dist/cjs/lib/common/network.d.ts +10 -0
- package/dist/cjs/lib/common/network.js +60 -0
- package/dist/cjs/lib/common/number.d.ts +13 -0
- package/dist/cjs/lib/common/number.js +43 -0
- package/dist/cjs/lib/common/promise.d.ts +21 -0
- package/dist/cjs/lib/common/promise.js +70 -0
- package/dist/cjs/lib/common/transport.d.ts +104 -0
- package/dist/cjs/lib/common/transport.js +441 -0
- package/dist/cjs/lib/common/type.d.ts +3 -0
- package/dist/cjs/lib/common/type.js +2 -0
- package/dist/cjs/lib/dtls/cipher/const.d.ts +42 -0
- package/dist/cjs/lib/dtls/cipher/const.js +33 -0
- package/dist/cjs/lib/dtls/cipher/create.d.ts +21 -0
- package/dist/cjs/lib/dtls/cipher/create.js +105 -0
- package/dist/cjs/lib/dtls/cipher/ec.d.ts +28 -0
- package/dist/cjs/lib/dtls/cipher/ec.js +44 -0
- package/dist/cjs/lib/dtls/cipher/key-exchange.d.ts +43 -0
- package/dist/cjs/lib/dtls/cipher/key-exchange.js +113 -0
- package/dist/cjs/lib/dtls/cipher/namedCurve.d.ts +7 -0
- package/dist/cjs/lib/dtls/cipher/namedCurve.js +27 -0
- package/dist/cjs/lib/dtls/cipher/prf.d.ts +17 -0
- package/dist/cjs/lib/dtls/cipher/prf.js +92 -0
- package/dist/cjs/lib/dtls/cipher/suites/abstract.d.ts +40 -0
- package/dist/cjs/lib/dtls/cipher/suites/abstract.js +41 -0
- package/dist/cjs/lib/dtls/cipher/suites/aead.d.ts +28 -0
- package/dist/cjs/lib/dtls/cipher/suites/aead.js +132 -0
- package/dist/cjs/lib/dtls/cipher/suites/null.d.ts +24 -0
- package/dist/cjs/lib/dtls/cipher/suites/null.js +41 -0
- package/dist/cjs/lib/dtls/cipher/utils.d.ts +18 -0
- package/dist/cjs/lib/dtls/cipher/utils.js +70 -0
- package/dist/cjs/lib/dtls/cipher/x509.d.ts +33 -0
- package/dist/cjs/lib/dtls/cipher/x509.js +100 -0
- package/dist/cjs/lib/dtls/client.d.ts +7 -0
- package/dist/cjs/lib/dtls/client.js +76 -0
- package/dist/cjs/lib/dtls/context/cipher.d.ts +42 -0
- package/dist/cjs/lib/dtls/context/cipher.js +87 -0
- package/dist/cjs/lib/dtls/context/dtls.d.ts +38 -0
- package/dist/cjs/lib/dtls/context/dtls.js +49 -0
- package/dist/cjs/lib/dtls/context/srtp.d.ts +5 -0
- package/dist/cjs/lib/dtls/context/srtp.js +12 -0
- package/dist/cjs/lib/dtls/context/transport.d.ts +8 -0
- package/dist/cjs/lib/dtls/context/transport.js +17 -0
- package/dist/cjs/lib/dtls/flight/client/flight1.d.ts +10 -0
- package/dist/cjs/lib/dtls/flight/client/flight1.js +26 -0
- package/dist/cjs/lib/dtls/flight/client/flight3.d.ts +8 -0
- package/dist/cjs/lib/dtls/flight/client/flight3.js +25 -0
- package/dist/cjs/lib/dtls/flight/client/flight5.d.ts +18 -0
- package/dist/cjs/lib/dtls/flight/client/flight5.js +206 -0
- package/dist/cjs/lib/dtls/flight/flight.d.ts +18 -0
- package/dist/cjs/lib/dtls/flight/flight.js +68 -0
- package/dist/cjs/lib/dtls/flight/server/flight2.d.ts +6 -0
- package/dist/cjs/lib/dtls/flight/server/flight2.js +126 -0
- package/dist/cjs/lib/dtls/flight/server/flight4.d.ts +17 -0
- package/dist/cjs/lib/dtls/flight/server/flight4.js +87 -0
- package/dist/cjs/lib/dtls/flight/server/flight6.d.ts +13 -0
- package/dist/cjs/lib/dtls/flight/server/flight6.js +111 -0
- package/dist/cjs/lib/dtls/handshake/binary.d.ts +16 -0
- package/dist/cjs/lib/dtls/handshake/binary.js +20 -0
- package/dist/cjs/lib/dtls/handshake/const.d.ts +13 -0
- package/dist/cjs/lib/dtls/handshake/const.js +17 -0
- package/dist/cjs/lib/dtls/handshake/extensions/ellipticCurves.d.ts +17 -0
- package/dist/cjs/lib/dtls/handshake/extensions/ellipticCurves.js +40 -0
- package/dist/cjs/lib/dtls/handshake/extensions/extendedMasterSecret.d.ts +3 -0
- package/dist/cjs/lib/dtls/handshake/extensions/extendedMasterSecret.js +7 -0
- package/dist/cjs/lib/dtls/handshake/extensions/renegotiationIndication.d.ts +18 -0
- package/dist/cjs/lib/dtls/handshake/extensions/renegotiationIndication.js +34 -0
- package/dist/cjs/lib/dtls/handshake/extensions/signature.d.ts +26 -0
- package/dist/cjs/lib/dtls/handshake/extensions/signature.js +39 -0
- package/dist/cjs/lib/dtls/handshake/extensions/useSrtp.d.ts +19 -0
- package/dist/cjs/lib/dtls/handshake/extensions/useSrtp.js +65 -0
- package/dist/cjs/lib/dtls/handshake/message/alert.d.ts +12 -0
- package/dist/cjs/lib/dtls/handshake/message/alert.js +24 -0
- package/dist/cjs/lib/dtls/handshake/message/certificate.d.ts +17 -0
- package/dist/cjs/lib/dtls/handshake/message/certificate.js +35 -0
- package/dist/cjs/lib/dtls/handshake/message/changeCipherSpec.d.ts +11 -0
- package/dist/cjs/lib/dtls/handshake/message/changeCipherSpec.js +24 -0
- package/dist/cjs/lib/dtls/handshake/message/client/certificateVerify.d.ts +20 -0
- package/dist/cjs/lib/dtls/handshake/message/client/certificateVerify.js +35 -0
- package/dist/cjs/lib/dtls/handshake/message/client/hello.d.ts +50 -0
- package/dist/cjs/lib/dtls/handshake/message/client/hello.js +48 -0
- package/dist/cjs/lib/dtls/handshake/message/client/keyExchange.d.ts +17 -0
- package/dist/cjs/lib/dtls/handshake/message/client/keyExchange.js +33 -0
- package/dist/cjs/lib/dtls/handshake/message/finished.d.ts +13 -0
- package/dist/cjs/lib/dtls/handshake/message/finished.js +26 -0
- package/dist/cjs/lib/dtls/handshake/message/server/certificateRequest.d.ts +31 -0
- package/dist/cjs/lib/dtls/handshake/message/server/certificateRequest.js +38 -0
- package/dist/cjs/lib/dtls/handshake/message/server/hello.d.ts +33 -0
- package/dist/cjs/lib/dtls/handshake/message/server/hello.js +57 -0
- package/dist/cjs/lib/dtls/handshake/message/server/helloDone.d.ts +12 -0
- package/dist/cjs/lib/dtls/handshake/message/server/helloDone.js +30 -0
- package/dist/cjs/lib/dtls/handshake/message/server/helloVerifyRequest.d.ts +32 -0
- package/dist/cjs/lib/dtls/handshake/message/server/helloVerifyRequest.js +42 -0
- package/dist/cjs/lib/dtls/handshake/message/server/keyExchange.d.ts +32 -0
- package/dist/cjs/lib/dtls/handshake/message/server/keyExchange.js +49 -0
- package/dist/cjs/lib/dtls/handshake/random.d.ts +13 -0
- package/dist/cjs/lib/dtls/handshake/random.js +29 -0
- package/dist/cjs/lib/dtls/helper.d.ts +4 -0
- package/dist/cjs/lib/dtls/helper.js +30 -0
- package/dist/cjs/lib/dtls/imports/common.d.ts +1 -0
- package/dist/cjs/lib/dtls/imports/common.js +17 -0
- package/dist/cjs/lib/dtls/imports/rtp.d.ts +1 -0
- package/dist/cjs/lib/dtls/imports/rtp.js +17 -0
- package/dist/cjs/lib/dtls/index.d.ts +7 -0
- package/dist/cjs/lib/dtls/index.js +117 -0
- package/dist/cjs/lib/dtls/record/antiReplayWindow.d.ts +27 -0
- package/dist/cjs/lib/dtls/record/antiReplayWindow.js +102 -0
- package/dist/cjs/lib/dtls/record/builder.d.ts +9 -0
- package/dist/cjs/lib/dtls/record/builder.js +27 -0
- package/dist/cjs/lib/dtls/record/const.d.ts +33 -0
- package/dist/cjs/lib/dtls/record/const.js +38 -0
- package/dist/cjs/lib/dtls/record/message/fragment.d.ts +26 -0
- package/dist/cjs/lib/dtls/record/message/fragment.js +96 -0
- package/dist/cjs/lib/dtls/record/message/header.d.ts +38 -0
- package/dist/cjs/lib/dtls/record/message/header.js +34 -0
- package/dist/cjs/lib/dtls/record/message/plaintext.d.ts +14 -0
- package/dist/cjs/lib/dtls/record/message/plaintext.js +63 -0
- package/dist/cjs/lib/dtls/record/receive.d.ts +9 -0
- package/dist/cjs/lib/dtls/record/receive.js +91 -0
- package/dist/cjs/lib/dtls/server.d.ts +6 -0
- package/dist/cjs/lib/dtls/server.js +78 -0
- package/dist/cjs/lib/dtls/socket.d.ts +52 -0
- package/dist/cjs/lib/dtls/socket.js +188 -0
- package/dist/cjs/lib/dtls/typings/domain.d.ts +20 -0
- package/dist/cjs/lib/dtls/typings/domain.js +2 -0
- package/dist/cjs/lib/dtls/util/binary.d.ts +2 -0
- package/dist/cjs/lib/dtls/util/binary.js +8 -0
- package/dist/cjs/lib/ice/candidate.d.ts +35 -0
- package/dist/cjs/lib/ice/candidate.js +198 -0
- package/dist/cjs/lib/ice/dns/lookup.d.ts +16 -0
- package/dist/cjs/lib/ice/dns/lookup.js +133 -0
- package/dist/cjs/lib/ice/dns/mdns.d.ts +38 -0
- package/dist/cjs/lib/ice/dns/mdns.js +145 -0
- package/dist/cjs/lib/ice/exceptions.d.ts +24 -0
- package/dist/cjs/lib/ice/exceptions.js +41 -0
- package/dist/cjs/lib/ice/helper.d.ts +17 -0
- package/dist/cjs/lib/ice/helper.js +74 -0
- package/dist/cjs/lib/ice/ice.d.ts +182 -0
- package/dist/cjs/lib/ice/ice.js +1584 -0
- package/dist/cjs/lib/ice/iceBase.d.ts +214 -0
- package/dist/cjs/lib/ice/iceBase.js +182 -0
- package/dist/cjs/lib/ice/imports/common.d.ts +1 -0
- package/dist/cjs/lib/ice/imports/common.js +17 -0
- package/dist/cjs/lib/ice/index.d.ts +12 -0
- package/dist/cjs/lib/ice/index.js +30 -0
- package/dist/cjs/lib/ice/internal/selectAddresses.d.ts +9 -0
- package/dist/cjs/lib/ice/internal/selectAddresses.js +39 -0
- package/dist/cjs/lib/ice/stun/attributes.d.ts +1 -0
- package/dist/cjs/lib/ice/stun/attributes.js +17 -0
- package/dist/cjs/lib/ice/stun/const.d.ts +8 -0
- package/dist/cjs/lib/ice/stun/const.js +25 -0
- package/dist/cjs/lib/ice/stun/message.d.ts +1 -0
- package/dist/cjs/lib/ice/stun/message.js +17 -0
- package/dist/cjs/lib/ice/stun/protocol.d.ts +30 -0
- package/dist/cjs/lib/ice/stun/protocol.js +125 -0
- package/dist/cjs/lib/ice/stun/tcpFrame.d.ts +5 -0
- package/dist/cjs/lib/ice/stun/tcpFrame.js +25 -0
- package/dist/cjs/lib/ice/stun/tcpProtocol.d.ts +57 -0
- package/dist/cjs/lib/ice/stun/tcpProtocol.js +323 -0
- package/dist/cjs/lib/ice/stun/transaction.d.ts +75 -0
- package/dist/cjs/lib/ice/stun/transaction.js +239 -0
- package/dist/cjs/lib/ice/turn/frame.d.ts +1 -0
- package/dist/cjs/lib/ice/turn/frame.js +17 -0
- package/dist/cjs/lib/ice/turn/protocol.d.ts +170 -0
- package/dist/cjs/lib/ice/turn/protocol.js +638 -0
- package/dist/cjs/lib/ice/types/model.d.ts +56 -0
- package/dist/cjs/lib/ice/types/model.js +2 -0
- package/dist/cjs/lib/ice/utils.d.ts +13 -0
- package/dist/cjs/lib/ice/utils.js +84 -0
- package/dist/cjs/lib/peer/const.d.ts +36 -0
- package/dist/cjs/lib/peer/const.js +53 -0
- package/dist/cjs/lib/peer/dataChannel.d.ts +69 -0
- package/dist/cjs/lib/peer/dataChannel.js +133 -0
- package/dist/cjs/lib/peer/errors.d.ts +11 -0
- package/dist/cjs/lib/peer/errors.js +23 -0
- package/dist/cjs/lib/peer/helper.d.ts +20 -0
- package/dist/cjs/lib/peer/helper.js +84 -0
- package/dist/cjs/lib/peer/imports/common.d.ts +1 -0
- package/dist/cjs/lib/peer/imports/common.js +17 -0
- package/dist/cjs/lib/peer/imports/dtls.d.ts +1 -0
- package/dist/cjs/lib/peer/imports/dtls.js +17 -0
- package/dist/cjs/lib/peer/imports/ice.d.ts +1 -0
- package/dist/cjs/lib/peer/imports/ice.js +17 -0
- package/dist/cjs/lib/peer/imports/rtp.d.ts +1 -0
- package/dist/cjs/lib/peer/imports/rtp.js +17 -0
- package/dist/cjs/lib/peer/index.d.ts +14 -0
- package/dist/cjs/lib/peer/index.js +30 -0
- package/dist/cjs/lib/peer/media/codec.d.ts +15 -0
- package/dist/cjs/lib/peer/media/codec.js +80 -0
- package/dist/cjs/lib/peer/media/codecCompatibility.d.ts +23 -0
- package/dist/cjs/lib/peer/media/codecCompatibility.js +137 -0
- package/dist/cjs/lib/peer/media/extension/rtcpFeedback.d.ts +6 -0
- package/dist/cjs/lib/peer/media/extension/rtcpFeedback.js +13 -0
- package/dist/cjs/lib/peer/media/extension/rtpExtension.d.ts +9 -0
- package/dist/cjs/lib/peer/media/extension/rtpExtension.js +52 -0
- package/dist/cjs/lib/peer/media/index.d.ts +12 -0
- package/dist/cjs/lib/peer/media/index.js +28 -0
- package/dist/cjs/lib/peer/media/parameters.d.ts +65 -0
- package/dist/cjs/lib/peer/media/parameters.js +60 -0
- package/dist/cjs/lib/peer/media/receiver/nack.d.ts +23 -0
- package/dist/cjs/lib/peer/media/receiver/nack.js +104 -0
- package/dist/cjs/lib/peer/media/receiver/receiverTwcc.d.ts +47 -0
- package/dist/cjs/lib/peer/media/receiver/receiverTwcc.js +179 -0
- package/dist/cjs/lib/peer/media/receiver/statistics.d.ts +22 -0
- package/dist/cjs/lib/peer/media/receiver/statistics.js +71 -0
- package/dist/cjs/lib/peer/media/router.d.ts +25 -0
- package/dist/cjs/lib/peer/media/router.js +166 -0
- package/dist/cjs/lib/peer/media/rtpReceiver.d.ts +90 -0
- package/dist/cjs/lib/peer/media/rtpReceiver.js +407 -0
- package/dist/cjs/lib/peer/media/rtpSender.d.ts +209 -0
- package/dist/cjs/lib/peer/media/rtpSender.js +826 -0
- package/dist/cjs/lib/peer/media/rtpTransceiver.d.ts +117 -0
- package/dist/cjs/lib/peer/media/rtpTransceiver.js +245 -0
- package/dist/cjs/lib/peer/media/sender/cumulativeResult.d.ts +19 -0
- package/dist/cjs/lib/peer/media/sender/cumulativeResult.js +61 -0
- package/dist/cjs/lib/peer/media/sender/senderBWE.d.ts +32 -0
- package/dist/cjs/lib/peer/media/sender/senderBWE.js +99 -0
- package/dist/cjs/lib/peer/media/stats.d.ts +293 -0
- package/dist/cjs/lib/peer/media/stats.js +90 -0
- package/dist/cjs/lib/peer/media/track.d.ts +67 -0
- package/dist/cjs/lib/peer/media/track.js +216 -0
- package/dist/cjs/lib/peer/peerConnection.d.ts +458 -0
- package/dist/cjs/lib/peer/peerConnection.js +1591 -0
- package/dist/cjs/lib/peer/sctpManager.d.ts +28 -0
- package/dist/cjs/lib/peer/sctpManager.js +138 -0
- package/dist/cjs/lib/peer/sdp.d.ts +97 -0
- package/dist/cjs/lib/peer/sdp.js +628 -0
- package/dist/cjs/lib/peer/sdpManager.d.ts +116 -0
- package/dist/cjs/lib/peer/sdpManager.js +573 -0
- package/dist/cjs/lib/peer/secureTransportManager.d.ts +96 -0
- package/dist/cjs/lib/peer/secureTransportManager.js +472 -0
- package/dist/cjs/lib/peer/transceiverManager.d.ts +151 -0
- package/dist/cjs/lib/peer/transceiverManager.js +767 -0
- package/dist/cjs/lib/peer/transport/dtls.d.ts +95 -0
- package/dist/cjs/lib/peer/transport/dtls.js +571 -0
- package/dist/cjs/lib/peer/transport/ice.d.ts +143 -0
- package/dist/cjs/lib/peer/transport/ice.js +436 -0
- package/dist/cjs/lib/peer/transport/sctp.d.ts +56 -0
- package/dist/cjs/lib/peer/transport/sctp.js +387 -0
- package/dist/cjs/lib/peer/types/domain.d.ts +5 -0
- package/dist/cjs/lib/peer/types/domain.js +19 -0
- package/dist/cjs/lib/peer/types/util.d.ts +2 -0
- package/dist/cjs/lib/peer/types/util.js +2 -0
- package/dist/cjs/lib/peer/utils.d.ts +73 -0
- package/dist/cjs/lib/peer/utils.js +306 -0
- package/dist/cjs/lib/rtp/codec/av1.d.ts +56 -0
- package/dist/cjs/lib/rtp/codec/av1.js +209 -0
- package/dist/cjs/lib/rtp/codec/base.d.ts +8 -0
- package/dist/cjs/lib/rtp/codec/base.js +15 -0
- package/dist/cjs/lib/rtp/codec/h264.d.ts +32 -0
- package/dist/cjs/lib/rtp/codec/h264.js +122 -0
- package/dist/cjs/lib/rtp/codec/index.d.ts +16 -0
- package/dist/cjs/lib/rtp/codec/index.js +84 -0
- package/dist/cjs/lib/rtp/codec/leb128.d.ts +5 -0
- package/dist/cjs/lib/rtp/codec/leb128.js +23 -0
- package/dist/cjs/lib/rtp/codec/opus.d.ts +9 -0
- package/dist/cjs/lib/rtp/codec/opus.js +25 -0
- package/dist/cjs/lib/rtp/codec/vp8.d.ts +27 -0
- package/dist/cjs/lib/rtp/codec/vp8.js +109 -0
- package/dist/cjs/lib/rtp/codec/vp9.d.ts +46 -0
- package/dist/cjs/lib/rtp/codec/vp9.js +161 -0
- package/dist/cjs/lib/rtp/const.d.ts +1 -0
- package/dist/cjs/lib/rtp/const.js +4 -0
- package/dist/cjs/lib/rtp/helper.d.ts +8 -0
- package/dist/cjs/lib/rtp/helper.js +36 -0
- package/dist/cjs/lib/rtp/imports/common.d.ts +1 -0
- package/dist/cjs/lib/rtp/imports/common.js +17 -0
- package/dist/cjs/lib/rtp/index.d.ts +25 -0
- package/dist/cjs/lib/rtp/index.js +41 -0
- package/dist/cjs/lib/rtp/rtcp/header.d.ts +13 -0
- package/dist/cjs/lib/rtp/rtcp/header.js +50 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/fullIntraRequest.d.ts +16 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/fullIntraRequest.js +34 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/index.d.ts +14 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/index.js +39 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/pictureLossIndication.d.ts +10 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/pictureLossIndication.js +20 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/remb.d.ts +16 -0
- package/dist/cjs/lib/rtp/rtcp/psfb/remb.js +53 -0
- package/dist/cjs/lib/rtp/rtcp/rr.d.ts +32 -0
- package/dist/cjs/lib/rtp/rtcp/rr.js +73 -0
- package/dist/cjs/lib/rtp/rtcp/rtcp.d.ts +10 -0
- package/dist/cjs/lib/rtp/rtcp/rtcp.js +58 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/const.d.ts +1 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/const.js +4 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/index.d.ts +14 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/index.js +35 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/nack.d.ts +17 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/nack.js +77 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/twcc.d.ts +71 -0
- package/dist/cjs/lib/rtp/rtcp/rtpfb/twcc.js +352 -0
- package/dist/cjs/lib/rtp/rtcp/sdes.d.ts +26 -0
- package/dist/cjs/lib/rtp/rtcp/sdes.js +97 -0
- package/dist/cjs/lib/rtp/rtcp/sr.d.ts +41 -0
- package/dist/cjs/lib/rtp/rtcp/sr.js +110 -0
- package/dist/cjs/lib/rtp/rtp/headerExtension.d.ts +72 -0
- package/dist/cjs/lib/rtp/rtp/headerExtension.js +117 -0
- package/dist/cjs/lib/rtp/rtp/red/encoder.d.ts +13 -0
- package/dist/cjs/lib/rtp/rtp/red/encoder.js +44 -0
- package/dist/cjs/lib/rtp/rtp/red/handler.d.ts +6 -0
- package/dist/cjs/lib/rtp/rtp/red/handler.js +59 -0
- package/dist/cjs/lib/rtp/rtp/red/packet.d.ts +26 -0
- package/dist/cjs/lib/rtp/rtp/red/packet.js +112 -0
- package/dist/cjs/lib/rtp/rtp/rtp.d.ts +44 -0
- package/dist/cjs/lib/rtp/rtp/rtp.js +271 -0
- package/dist/cjs/lib/rtp/rtp/rtx.d.ts +3 -0
- package/dist/cjs/lib/rtp/rtp/rtx.js +29 -0
- package/dist/cjs/lib/rtp/srtp/cipher/ctr.d.ts +16 -0
- package/dist/cjs/lib/rtp/srtp/cipher/ctr.js +107 -0
- package/dist/cjs/lib/rtp/srtp/cipher/gcm.d.ts +17 -0
- package/dist/cjs/lib/rtp/srtp/cipher/gcm.js +145 -0
- package/dist/cjs/lib/rtp/srtp/cipher/index.d.ts +13 -0
- package/dist/cjs/lib/rtp/srtp/cipher/index.js +24 -0
- package/dist/cjs/lib/rtp/srtp/const.d.ts +6 -0
- package/dist/cjs/lib/rtp/srtp/const.js +26 -0
- package/dist/cjs/lib/rtp/srtp/context/context.d.ts +45 -0
- package/dist/cjs/lib/rtp/srtp/context/context.js +180 -0
- package/dist/cjs/lib/rtp/srtp/context/srtcp.d.ts +8 -0
- package/dist/cjs/lib/rtp/srtp/context/srtcp.js +25 -0
- package/dist/cjs/lib/rtp/srtp/context/srtp.d.ts +9 -0
- package/dist/cjs/lib/rtp/srtp/context/srtp.js +41 -0
- package/dist/cjs/lib/rtp/srtp/error.d.ts +3 -0
- package/dist/cjs/lib/rtp/srtp/error.js +10 -0
- package/dist/cjs/lib/rtp/srtp/packet.d.ts +5 -0
- package/dist/cjs/lib/rtp/srtp/packet.js +47 -0
- package/dist/cjs/lib/rtp/srtp/session.d.ts +19 -0
- package/dist/cjs/lib/rtp/srtp/session.js +13 -0
- package/dist/cjs/lib/rtp/srtp/srtcp.d.ts +8 -0
- package/dist/cjs/lib/rtp/srtp/srtcp.js +21 -0
- package/dist/cjs/lib/rtp/srtp/srtp.d.ts +9 -0
- package/dist/cjs/lib/rtp/srtp/srtp.js +20 -0
- package/dist/cjs/lib/rtp/transport.d.ts +15 -0
- package/dist/cjs/lib/rtp/transport.js +23 -0
- package/dist/cjs/lib/rtp/util.d.ts +11 -0
- package/dist/cjs/lib/rtp/util.js +28 -0
- package/dist/cjs/lib/sctp/chunk.d.ts +164 -0
- package/dist/cjs/lib/sctp/chunk.js +542 -0
- package/dist/cjs/lib/sctp/const.d.ts +17 -0
- package/dist/cjs/lib/sctp/const.js +22 -0
- package/dist/cjs/lib/sctp/helper.d.ts +5 -0
- package/dist/cjs/lib/sctp/helper.js +14 -0
- package/dist/cjs/lib/sctp/imports/common.d.ts +1 -0
- package/dist/cjs/lib/sctp/imports/common.js +17 -0
- package/dist/cjs/lib/sctp/index.d.ts +6 -0
- package/dist/cjs/lib/sctp/index.js +20 -0
- package/dist/cjs/lib/sctp/param.d.ts +40 -0
- package/dist/cjs/lib/sctp/param.js +132 -0
- package/dist/cjs/lib/sctp/sctp.d.ts +210 -0
- package/dist/cjs/lib/sctp/sctp.js +1467 -0
- package/dist/cjs/lib/sctp/transport.d.ts +15 -0
- package/dist/cjs/lib/sctp/transport.js +28 -0
- package/dist/cjs/lib/turn/index.d.ts +9 -0
- package/dist/cjs/lib/turn/index.js +25 -0
- package/dist/cjs/lib/turn/node/server.d.ts +21 -0
- package/dist/cjs/lib/turn/node/server.js +94 -0
- package/dist/cjs/lib/turn/node/turnServer.d.ts +91 -0
- package/dist/cjs/lib/turn/node/turnServer.js +565 -0
- package/dist/cjs/lib/turn/protocol.d.ts +47 -0
- package/dist/cjs/lib/turn/protocol.js +116 -0
- package/dist/cjs/lib/turn/stun/attributes.d.ts +37 -0
- package/dist/cjs/lib/turn/stun/attributes.js +208 -0
- package/dist/cjs/lib/turn/stun/const.d.ts +28 -0
- package/dist/cjs/lib/turn/stun/const.js +87 -0
- package/dist/cjs/lib/turn/stun/ip.d.ts +12 -0
- package/dist/cjs/lib/turn/stun/ip.js +87 -0
- package/dist/cjs/lib/turn/stun/message.d.ts +37 -0
- package/dist/cjs/lib/turn/stun/message.js +180 -0
- package/dist/cjs/lib/turn/turn/auth.d.ts +1 -0
- package/dist/cjs/lib/turn/turn/auth.js +9 -0
- package/dist/cjs/lib/turn/turn/frame.d.ts +13 -0
- package/dist/cjs/lib/turn/turn/frame.js +68 -0
- package/dist/cjs/lib/turn/turn/protocol.d.ts +147 -0
- package/dist/cjs/lib/turn/turn/protocol.js +785 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/peer/Endpoints.d.ts +75 -0
- package/dist/cjs/peer/Endpoints.js +154 -0
- package/dist/cjs/peer/EngineConfig.d.ts +20 -0
- package/dist/cjs/peer/EngineConfig.js +36 -0
- package/dist/cjs/peer/EngineConnection.d.ts +22 -0
- package/dist/cjs/peer/EngineConnection.js +27 -0
- package/dist/cjs/peer/Events.d.ts +55 -0
- package/dist/cjs/peer/Events.js +85 -0
- package/dist/cjs/peer/MediaCodecs.d.ts +27 -0
- package/dist/cjs/peer/MediaCodecs.js +53 -0
- package/dist/cjs/peer/MediaTrack.d.ts +212 -0
- package/dist/cjs/peer/MediaTrack.js +313 -0
- package/dist/cjs/peer/PeerChannel.d.ts +248 -0
- package/dist/cjs/peer/PeerChannel.js +319 -0
- package/dist/cjs/peer/PeerConnection.d.ts +603 -0
- package/dist/cjs/peer/PeerConnection.js +697 -0
- package/dist/cjs/peer/PeerThreadChannel.d.ts +112 -0
- package/dist/cjs/peer/PeerThreadChannel.js +273 -0
- package/dist/cjs/peer/PeerThreadProtocol.d.ts +325 -0
- package/dist/cjs/peer/PeerThreadProtocol.js +2 -0
- package/dist/cjs/peer/PeerThreads.d.ts +114 -0
- package/dist/cjs/peer/PeerThreads.js +268 -0
- package/dist/cjs/peer/PeerWorker.d.ts +6 -0
- package/dist/cjs/peer/PeerWorker.js +461 -0
- package/dist/cjs/peer/PeerWorkerCode.d.ts +5 -0
- package/dist/cjs/peer/PeerWorkerCode.js +4 -0
- package/dist/cjs/peer/RemoteConnection.d.ts +314 -0
- package/dist/cjs/peer/RemoteConnection.js +913 -0
- package/dist/cjs/peer/RtpPacket.d.ts +112 -0
- package/dist/cjs/peer/RtpPacket.js +92 -0
- package/dist/cjs/peer/RtpTransceiver.d.ts +167 -0
- package/dist/cjs/peer/RtpTransceiver.js +235 -0
- package/dist/cjs/peer/SignalingClient.d.ts +236 -0
- package/dist/cjs/peer/SignalingClient.js +285 -0
- package/dist/cjs/protocol/SignalingProtocol.d.ts +266 -0
- package/dist/cjs/protocol/SignalingProtocol.js +65 -0
- package/dist/cjs/service/WebRTCServiceEntrypoint.d.ts +158 -0
- package/dist/cjs/service/WebRTCServiceEntrypoint.js +356 -0
- package/dist/cjs/sfu/SFU.d.ts +356 -0
- package/dist/cjs/sfu/SFU.js +763 -0
- package/dist/cjs/sfu/SFUAccess.d.ts +48 -0
- package/dist/cjs/sfu/SFUAccess.js +15 -0
- package/dist/cjs/sfu/SFUClusterLeg.d.ts +101 -0
- package/dist/cjs/sfu/SFUClusterLeg.js +106 -0
- package/dist/cjs/sfu/SFURoom.d.ts +148 -0
- package/dist/cjs/sfu/SFURoom.js +1300 -0
- package/dist/cjs/sfu/SFUWorker.d.ts +13 -0
- package/dist/cjs/sfu/SFUWorker.js +168 -0
- package/dist/cjs/sfu/SFUWorkerChannel.d.ts +204 -0
- package/dist/cjs/sfu/SFUWorkerChannel.js +105 -0
- package/dist/cjs/sfu/SFUWorkerCode.d.ts +5 -0
- package/dist/cjs/sfu/SFUWorkerCode.js +4 -0
- package/dist/cjs/sfu/SFUWorkers.d.ts +247 -0
- package/dist/cjs/sfu/SFUWorkers.js +552 -0
- package/dist/cjs/shared/ChunkedChannel.d.ts +122 -0
- package/dist/cjs/shared/ChunkedChannel.js +182 -0
- package/dist/cjs/shared/Connections.d.ts +231 -0
- package/dist/cjs/shared/Connections.js +2 -0
- package/dist/cjs/shared/Emitter.d.ts +50 -0
- package/dist/cjs/shared/Emitter.js +80 -0
- package/dist/cjs/shared/Peer.d.ts +182 -0
- package/dist/cjs/shared/Peer.js +509 -0
- package/dist/cjs/shared/PeerServiceProxy.d.ts +173 -0
- package/dist/cjs/shared/PeerServiceProxy.js +304 -0
- package/dist/cjs/shared/Room.d.ts +143 -0
- package/dist/cjs/shared/Room.js +515 -0
- package/dist/cjs/shared/SignalingError.d.ts +40 -0
- package/dist/cjs/shared/SignalingError.js +48 -0
- package/dist/cjs/shared/SignalingSession.d.ts +97 -0
- package/dist/cjs/shared/SignalingSession.js +347 -0
- package/dist/cjs/shared/Transports.d.ts +139 -0
- package/dist/cjs/shared/Transports.js +285 -0
- package/dist/cjs/signaling/MediaServers.d.ts +40 -0
- package/dist/cjs/signaling/MediaServers.js +16 -0
- package/dist/cjs/signaling/Signaling.d.ts +573 -0
- package/dist/cjs/signaling/Signaling.js +945 -0
- package/dist/cjs/signaling/SignalingController.d.ts +128 -0
- package/dist/cjs/signaling/SignalingController.js +229 -0
- package/dist/cjs/turn/TURNCredentials.d.ts +49 -0
- package/dist/cjs/turn/TURNCredentials.js +49 -0
- package/dist/cjs/turn/TURNIceServers.d.ts +11 -0
- package/dist/cjs/turn/TURNIceServers.js +25 -0
- package/dist/cjs/turn/TURNServer.d.ts +309 -0
- package/dist/cjs/turn/TURNServer.js +331 -0
- package/dist/cjs/turn/TURNWorker.d.ts +42 -0
- package/dist/cjs/turn/TURNWorker.js +52 -0
- package/dist/cjs/turn/TURNWorkerCode.d.ts +5 -0
- package/dist/cjs/turn/TURNWorkerCode.js +4 -0
- package/dist/cjs/turn/TURNWorkers.d.ts +52 -0
- package/dist/cjs/turn/TURNWorkers.js +211 -0
- package/dist/cjs/whep/WHEP.d.ts +386 -0
- package/dist/cjs/whep/WHEP.js +426 -0
- package/dist/cjs/whep/WHEPController.d.ts +134 -0
- package/dist/cjs/whep/WHEPController.js +301 -0
- package/dist/cjs/whip/WHIP.d.ts +426 -0
- package/dist/cjs/whip/WHIP.js +470 -0
- package/dist/cjs/whip/WHIPController.d.ts +132 -0
- package/dist/cjs/whip/WHIPController.js +299 -0
- package/dist/esm/client/SignalingConnection.js +63 -0
- package/dist/esm/cluster/Cluster.js +542 -0
- package/dist/esm/cluster/ClusterFrames.js +85 -0
- package/dist/esm/cluster/ClusterTURN.js +73 -0
- package/dist/esm/cluster/Rendezvous.js +20 -0
- package/dist/esm/cluster/transports/ClusterTransport.js +1 -0
- package/dist/esm/cluster/transports/LoadClient.js +44 -0
- package/dist/esm/cluster/transports/MemoryClusterTransport.js +43 -0
- package/dist/esm/cluster/transports/NATSClusterTransport.js +66 -0
- package/dist/esm/cluster/transports/RedisClusterTransport.js +73 -0
- package/dist/esm/exceptions/ClusterRequestException.js +14 -0
- package/dist/esm/exceptions/ClusterTimeoutException.js +13 -0
- package/dist/esm/exceptions/ClusterTransportNotFoundException.js +14 -0
- package/dist/esm/exceptions/SignalingClientRequiredException.js +15 -0
- package/dist/esm/exceptions/SignalingConnectionException.js +15 -0
- package/dist/esm/exceptions/SignalingDeniedException.js +14 -0
- package/dist/esm/exceptions/SignalingLimitException.js +14 -0
- package/dist/esm/exceptions/SignalingNotAMemberException.js +14 -0
- package/dist/esm/exceptions/WHEPDeniedException.js +18 -0
- package/dist/esm/exceptions/WHEPLimitException.js +18 -0
- package/dist/esm/exceptions/WHEPMediaTypeException.js +18 -0
- package/dist/esm/exceptions/WHEPOfferException.js +19 -0
- package/dist/esm/exceptions/WHEPSessionNotFoundException.js +18 -0
- package/dist/esm/exceptions/WHIPDeniedException.js +18 -0
- package/dist/esm/exceptions/WHIPLimitException.js +18 -0
- package/dist/esm/exceptions/WHIPMediaTypeException.js +18 -0
- package/dist/esm/exceptions/WHIPOfferException.js +19 -0
- package/dist/esm/exceptions/WHIPSessionNotFoundException.js +18 -0
- package/dist/esm/exports/Client.js +5 -0
- package/dist/esm/exports/WebRTC.js +41 -0
- package/dist/esm/lib/common/binary.js +244 -0
- package/dist/esm/lib/common/binaryData.js +392 -0
- package/dist/esm/lib/common/crc.js +118 -0
- package/dist/esm/lib/common/deque.js +85 -0
- package/dist/esm/lib/common/event.js +202 -0
- package/dist/esm/lib/common/index.js +11 -0
- package/dist/esm/lib/common/log.js +55 -0
- package/dist/esm/lib/common/network.js +52 -0
- package/dist/esm/lib/common/number.js +31 -0
- package/dist/esm/lib/common/promise.js +64 -0
- package/dist/esm/lib/common/transport.js +401 -0
- package/dist/esm/lib/common/type.js +1 -0
- package/dist/esm/lib/dtls/cipher/const.js +30 -0
- package/dist/esm/lib/dtls/cipher/create.js +98 -0
- package/dist/esm/lib/dtls/cipher/ec.js +37 -0
- package/dist/esm/lib/dtls/cipher/key-exchange.js +103 -0
- package/dist/esm/lib/dtls/cipher/namedCurve.js +24 -0
- package/dist/esm/lib/dtls/cipher/prf.js +79 -0
- package/dist/esm/lib/dtls/cipher/suites/abstract.js +37 -0
- package/dist/esm/lib/dtls/cipher/suites/aead.js +96 -0
- package/dist/esm/lib/dtls/cipher/suites/null.js +35 -0
- package/dist/esm/lib/dtls/cipher/utils.js +34 -0
- package/dist/esm/lib/dtls/cipher/x509.js +94 -0
- package/dist/esm/lib/dtls/client.js +72 -0
- package/dist/esm/lib/dtls/context/cipher.js +83 -0
- package/dist/esm/lib/dtls/context/dtls.js +45 -0
- package/dist/esm/lib/dtls/context/srtp.js +8 -0
- package/dist/esm/lib/dtls/context/transport.js +13 -0
- package/dist/esm/lib/dtls/flight/client/flight1.js +22 -0
- package/dist/esm/lib/dtls/flight/client/flight3.js +21 -0
- package/dist/esm/lib/dtls/flight/client/flight5.js +202 -0
- package/dist/esm/lib/dtls/flight/flight.js +64 -0
- package/dist/esm/lib/dtls/flight/server/flight2.js +122 -0
- package/dist/esm/lib/dtls/flight/server/flight4.js +83 -0
- package/dist/esm/lib/dtls/flight/server/flight6.js +107 -0
- package/dist/esm/lib/dtls/handshake/binary.js +17 -0
- package/dist/esm/lib/dtls/handshake/const.js +14 -0
- package/dist/esm/lib/dtls/handshake/extensions/ellipticCurves.js +36 -0
- package/dist/esm/lib/dtls/handshake/extensions/extendedMasterSecret.js +3 -0
- package/dist/esm/lib/dtls/handshake/extensions/renegotiationIndication.js +30 -0
- package/dist/esm/lib/dtls/handshake/extensions/signature.js +35 -0
- package/dist/esm/lib/dtls/handshake/extensions/useSrtp.js +61 -0
- package/dist/esm/lib/dtls/handshake/message/alert.js +20 -0
- package/dist/esm/lib/dtls/handshake/message/certificate.js +31 -0
- package/dist/esm/lib/dtls/handshake/message/changeCipherSpec.js +20 -0
- package/dist/esm/lib/dtls/handshake/message/client/certificateVerify.js +31 -0
- package/dist/esm/lib/dtls/handshake/message/client/hello.js +44 -0
- package/dist/esm/lib/dtls/handshake/message/client/keyExchange.js +29 -0
- package/dist/esm/lib/dtls/handshake/message/finished.js +22 -0
- package/dist/esm/lib/dtls/handshake/message/server/certificateRequest.js +34 -0
- package/dist/esm/lib/dtls/handshake/message/server/hello.js +53 -0
- package/dist/esm/lib/dtls/handshake/message/server/helloDone.js +26 -0
- package/dist/esm/lib/dtls/handshake/message/server/helloVerifyRequest.js +38 -0
- package/dist/esm/lib/dtls/handshake/message/server/keyExchange.js +45 -0
- package/dist/esm/lib/dtls/handshake/random.js +25 -0
- package/dist/esm/lib/dtls/helper.js +23 -0
- package/dist/esm/lib/dtls/imports/common.js +1 -0
- package/dist/esm/lib/dtls/imports/rtp.js +1 -0
- package/dist/esm/lib/dtls/index.js +97 -0
- package/dist/esm/lib/dtls/record/antiReplayWindow.js +98 -0
- package/dist/esm/lib/dtls/record/builder.js +22 -0
- package/dist/esm/lib/dtls/record/const.js +35 -0
- package/dist/esm/lib/dtls/record/message/fragment.js +92 -0
- package/dist/esm/lib/dtls/record/message/header.js +30 -0
- package/dist/esm/lib/dtls/record/message/plaintext.js +59 -0
- package/dist/esm/lib/dtls/record/receive.js +86 -0
- package/dist/esm/lib/dtls/server.js +74 -0
- package/dist/esm/lib/dtls/socket.js +184 -0
- package/dist/esm/lib/dtls/typings/domain.js +1 -0
- package/dist/esm/lib/dtls/util/binary.js +5 -0
- package/dist/esm/lib/ice/candidate.js +190 -0
- package/dist/esm/lib/ice/dns/lookup.js +95 -0
- package/dist/esm/lib/ice/dns/mdns.js +139 -0
- package/dist/esm/lib/ice/exceptions.js +34 -0
- package/dist/esm/lib/ice/helper.js +65 -0
- package/dist/esm/lib/ice/ice.js +1547 -0
- package/dist/esm/lib/ice/iceBase.js +172 -0
- package/dist/esm/lib/ice/imports/common.js +1 -0
- package/dist/esm/lib/ice/index.js +12 -0
- package/dist/esm/lib/ice/internal/selectAddresses.js +36 -0
- package/dist/esm/lib/ice/stun/attributes.js +1 -0
- package/dist/esm/lib/ice/stun/const.js +8 -0
- package/dist/esm/lib/ice/stun/message.js +1 -0
- package/dist/esm/lib/ice/stun/protocol.js +121 -0
- package/dist/esm/lib/ice/stun/tcpFrame.js +21 -0
- package/dist/esm/lib/ice/stun/tcpProtocol.js +318 -0
- package/dist/esm/lib/ice/stun/transaction.js +230 -0
- package/dist/esm/lib/ice/turn/frame.js +1 -0
- package/dist/esm/lib/ice/turn/protocol.js +630 -0
- package/dist/esm/lib/ice/types/model.js +1 -0
- package/dist/esm/lib/ice/utils.js +43 -0
- package/dist/esm/lib/peer/const.js +50 -0
- package/dist/esm/lib/peer/dataChannel.js +127 -0
- package/dist/esm/lib/peer/errors.js +17 -0
- package/dist/esm/lib/peer/helper.js +77 -0
- package/dist/esm/lib/peer/imports/common.js +1 -0
- package/dist/esm/lib/peer/imports/dtls.js +1 -0
- package/dist/esm/lib/peer/imports/ice.js +1 -0
- package/dist/esm/lib/peer/imports/rtp.js +1 -0
- package/dist/esm/lib/peer/index.js +14 -0
- package/dist/esm/lib/peer/media/codec.js +69 -0
- package/dist/esm/lib/peer/media/codecCompatibility.js +128 -0
- package/dist/esm/lib/peer/media/extension/rtcpFeedback.js +5 -0
- package/dist/esm/lib/peer/media/extension/rtpExtension.js +42 -0
- package/dist/esm/lib/peer/media/index.js +12 -0
- package/dist/esm/lib/peer/media/parameters.js +50 -0
- package/dist/esm/lib/peer/media/receiver/nack.js +100 -0
- package/dist/esm/lib/peer/media/receiver/receiverTwcc.js +175 -0
- package/dist/esm/lib/peer/media/receiver/statistics.js +67 -0
- package/dist/esm/lib/peer/media/router.js +162 -0
- package/dist/esm/lib/peer/media/rtpReceiver.js +403 -0
- package/dist/esm/lib/peer/media/rtpSender.js +822 -0
- package/dist/esm/lib/peer/media/rtpTransceiver.js +241 -0
- package/dist/esm/lib/peer/media/sender/cumulativeResult.js +57 -0
- package/dist/esm/lib/peer/media/sender/senderBWE.js +95 -0
- package/dist/esm/lib/peer/media/stats.js +81 -0
- package/dist/esm/lib/peer/media/track.js +208 -0
- package/dist/esm/lib/peer/peerConnection.js +1585 -0
- package/dist/esm/lib/peer/sctpManager.js +134 -0
- package/dist/esm/lib/peer/sdp.js +614 -0
- package/dist/esm/lib/peer/sdpManager.js +569 -0
- package/dist/esm/lib/peer/secureTransportManager.js +468 -0
- package/dist/esm/lib/peer/transceiverManager.js +763 -0
- package/dist/esm/lib/peer/transport/dtls.js +564 -0
- package/dist/esm/lib/peer/transport/ice.js +426 -0
- package/dist/esm/lib/peer/transport/sctp.js +382 -0
- package/dist/esm/lib/peer/types/domain.js +16 -0
- package/dist/esm/lib/peer/types/util.js +1 -0
- package/dist/esm/lib/peer/utils.js +286 -0
- package/dist/esm/lib/rtp/codec/av1.js +203 -0
- package/dist/esm/lib/rtp/codec/base.js +11 -0
- package/dist/esm/lib/rtp/codec/h264.js +118 -0
- package/dist/esm/lib/rtp/codec/index.js +66 -0
- package/dist/esm/lib/rtp/codec/leb128.js +20 -0
- package/dist/esm/lib/rtp/codec/opus.js +21 -0
- package/dist/esm/lib/rtp/codec/vp8.js +105 -0
- package/dist/esm/lib/rtp/codec/vp9.js +157 -0
- package/dist/esm/lib/rtp/const.js +1 -0
- package/dist/esm/lib/rtp/helper.js +29 -0
- package/dist/esm/lib/rtp/imports/common.js +1 -0
- package/dist/esm/lib/rtp/index.js +25 -0
- package/dist/esm/lib/rtp/rtcp/header.js +46 -0
- package/dist/esm/lib/rtp/rtcp/psfb/fullIntraRequest.js +30 -0
- package/dist/esm/lib/rtp/rtcp/psfb/index.js +35 -0
- package/dist/esm/lib/rtp/rtcp/psfb/pictureLossIndication.js +16 -0
- package/dist/esm/lib/rtp/rtcp/psfb/remb.js +49 -0
- package/dist/esm/lib/rtp/rtcp/rr.js +68 -0
- package/dist/esm/lib/rtp/rtcp/rtcp.js +53 -0
- package/dist/esm/lib/rtp/rtcp/rtpfb/const.js +1 -0
- package/dist/esm/lib/rtp/rtcp/rtpfb/index.js +31 -0
- package/dist/esm/lib/rtp/rtcp/rtpfb/nack.js +73 -0
- package/dist/esm/lib/rtp/rtcp/rtpfb/twcc.js +344 -0
- package/dist/esm/lib/rtp/rtcp/sdes.js +91 -0
- package/dist/esm/lib/rtp/rtcp/sr.js +104 -0
- package/dist/esm/lib/rtp/rtp/headerExtension.js +102 -0
- package/dist/esm/lib/rtp/rtp/red/encoder.js +40 -0
- package/dist/esm/lib/rtp/rtp/red/handler.js +55 -0
- package/dist/esm/lib/rtp/rtp/red/packet.js +107 -0
- package/dist/esm/lib/rtp/rtp/rtp.js +266 -0
- package/dist/esm/lib/rtp/rtp/rtx.js +25 -0
- package/dist/esm/lib/rtp/srtp/cipher/ctr.js +103 -0
- package/dist/esm/lib/rtp/srtp/cipher/gcm.js +141 -0
- package/dist/esm/lib/rtp/srtp/cipher/index.js +20 -0
- package/dist/esm/lib/rtp/srtp/const.js +21 -0
- package/dist/esm/lib/rtp/srtp/context/context.js +175 -0
- package/dist/esm/lib/rtp/srtp/context/srtcp.js +21 -0
- package/dist/esm/lib/rtp/srtp/context/srtp.js +37 -0
- package/dist/esm/lib/rtp/srtp/error.js +6 -0
- package/dist/esm/lib/rtp/srtp/packet.js +42 -0
- package/dist/esm/lib/rtp/srtp/session.js +9 -0
- package/dist/esm/lib/rtp/srtp/srtcp.js +17 -0
- package/dist/esm/lib/rtp/srtp/srtp.js +16 -0
- package/dist/esm/lib/rtp/transport.js +18 -0
- package/dist/esm/lib/rtp/util.js +24 -0
- package/dist/esm/lib/sctp/chunk.js +515 -0
- package/dist/esm/lib/sctp/const.js +19 -0
- package/dist/esm/lib/sctp/helper.js +10 -0
- package/dist/esm/lib/sctp/imports/common.js +1 -0
- package/dist/esm/lib/sctp/index.js +4 -0
- package/dist/esm/lib/sctp/param.js +126 -0
- package/dist/esm/lib/sctp/sctp.js +1459 -0
- package/dist/esm/lib/sctp/transport.js +23 -0
- package/dist/esm/lib/turn/index.js +9 -0
- package/dist/esm/lib/turn/node/server.js +89 -0
- package/dist/esm/lib/turn/node/turnServer.js +560 -0
- package/dist/esm/lib/turn/protocol.js +112 -0
- package/dist/esm/lib/turn/stun/attributes.js +198 -0
- package/dist/esm/lib/turn/stun/const.js +82 -0
- package/dist/esm/lib/turn/stun/ip.js +81 -0
- package/dist/esm/lib/turn/stun/message.js +174 -0
- package/dist/esm/lib/turn/turn/auth.js +6 -0
- package/dist/esm/lib/turn/turn/frame.js +61 -0
- package/dist/esm/lib/turn/turn/protocol.js +781 -0
- package/dist/esm/peer/Endpoints.js +143 -0
- package/dist/esm/peer/EngineConfig.js +33 -0
- package/dist/esm/peer/EngineConnection.js +22 -0
- package/dist/esm/peer/Events.js +81 -0
- package/dist/esm/peer/MediaCodecs.js +47 -0
- package/dist/esm/peer/MediaTrack.js +305 -0
- package/dist/esm/peer/PeerChannel.js +315 -0
- package/dist/esm/peer/PeerConnection.js +694 -0
- package/dist/esm/peer/PeerThreadChannel.js +266 -0
- package/dist/esm/peer/PeerThreadProtocol.js +1 -0
- package/dist/esm/peer/PeerThreads.js +264 -0
- package/dist/esm/peer/PeerWorker.js +458 -0
- package/dist/esm/peer/PeerWorkerCode.js +1 -0
- package/dist/esm/peer/RemoteConnection.js +905 -0
- package/dist/esm/peer/RtpPacket.js +86 -0
- package/dist/esm/peer/RtpTransceiver.js +225 -0
- package/dist/esm/peer/SignalingClient.js +249 -0
- package/dist/esm/protocol/SignalingProtocol.js +62 -0
- package/dist/esm/service/WebRTCServiceEntrypoint.js +352 -0
- package/dist/esm/sfu/SFU.js +759 -0
- package/dist/esm/sfu/SFUAccess.js +12 -0
- package/dist/esm/sfu/SFUClusterLeg.js +102 -0
- package/dist/esm/sfu/SFURoom.js +1296 -0
- package/dist/esm/sfu/SFUWorker.js +165 -0
- package/dist/esm/sfu/SFUWorkerChannel.js +101 -0
- package/dist/esm/sfu/SFUWorkerCode.js +1 -0
- package/dist/esm/sfu/SFUWorkers.js +547 -0
- package/dist/esm/shared/ChunkedChannel.js +178 -0
- package/dist/esm/shared/Connections.js +1 -0
- package/dist/esm/shared/Emitter.js +76 -0
- package/dist/esm/shared/Peer.js +505 -0
- package/dist/esm/shared/PeerServiceProxy.js +299 -0
- package/dist/esm/shared/Room.js +511 -0
- package/dist/esm/shared/SignalingError.js +43 -0
- package/dist/esm/shared/SignalingSession.js +343 -0
- package/dist/esm/shared/Transports.js +279 -0
- package/dist/esm/signaling/MediaServers.js +13 -0
- package/dist/esm/signaling/Signaling.js +941 -0
- package/dist/esm/signaling/SignalingController.js +225 -0
- package/dist/esm/turn/TURNCredentials.js +44 -0
- package/dist/esm/turn/TURNIceServers.js +22 -0
- package/dist/esm/turn/TURNServer.js +327 -0
- package/dist/esm/turn/TURNWorker.js +49 -0
- package/dist/esm/turn/TURNWorkerCode.js +1 -0
- package/dist/esm/turn/TURNWorkers.js +206 -0
- package/dist/esm/whep/WHEP.js +422 -0
- package/dist/esm/whep/WHEPController.js +298 -0
- package/dist/esm/whip/WHIP.js +466 -0
- package/dist/esm/whip/WHIPController.js +296 -0
- package/dist/types/client/SignalingConnection.d.ts +81 -0
- package/dist/types/cluster/Cluster.d.ts +503 -0
- package/dist/types/cluster/ClusterFrames.d.ts +24 -0
- package/dist/types/cluster/ClusterTURN.d.ts +63 -0
- package/dist/types/cluster/Rendezvous.d.ts +8 -0
- package/dist/types/cluster/transports/ClusterTransport.d.ts +34 -0
- package/dist/types/cluster/transports/LoadClient.d.ts +6 -0
- package/dist/types/cluster/transports/MemoryClusterTransport.d.ts +13 -0
- package/dist/types/cluster/transports/NATSClusterTransport.d.ts +23 -0
- package/dist/types/cluster/transports/RedisClusterTransport.d.ts +23 -0
- package/dist/types/exceptions/ClusterRequestException.d.ts +11 -0
- package/dist/types/exceptions/ClusterTimeoutException.d.ts +10 -0
- package/dist/types/exceptions/ClusterTransportNotFoundException.d.ts +11 -0
- package/dist/types/exceptions/SignalingClientRequiredException.d.ts +12 -0
- package/dist/types/exceptions/SignalingConnectionException.d.ts +12 -0
- package/dist/types/exceptions/SignalingDeniedException.d.ts +11 -0
- package/dist/types/exceptions/SignalingLimitException.d.ts +11 -0
- package/dist/types/exceptions/SignalingNotAMemberException.d.ts +11 -0
- package/dist/types/exceptions/WHEPDeniedException.d.ts +15 -0
- package/dist/types/exceptions/WHEPLimitException.d.ts +15 -0
- package/dist/types/exceptions/WHEPMediaTypeException.d.ts +15 -0
- package/dist/types/exceptions/WHEPOfferException.d.ts +16 -0
- package/dist/types/exceptions/WHEPSessionNotFoundException.d.ts +15 -0
- package/dist/types/exceptions/WHIPDeniedException.d.ts +15 -0
- package/dist/types/exceptions/WHIPLimitException.d.ts +15 -0
- package/dist/types/exceptions/WHIPMediaTypeException.d.ts +15 -0
- package/dist/types/exceptions/WHIPOfferException.d.ts +16 -0
- package/dist/types/exceptions/WHIPSessionNotFoundException.d.ts +15 -0
- package/dist/types/exports/Client.d.ts +11 -0
- package/dist/types/exports/WebRTC.d.ts +48 -0
- package/dist/types/lib/common/binary.d.ts +51 -0
- package/dist/types/lib/common/binaryData.d.ts +116 -0
- package/dist/types/lib/common/crc.d.ts +4 -0
- package/dist/types/lib/common/deque.d.ts +36 -0
- package/dist/types/lib/common/event.d.ts +48 -0
- package/dist/types/lib/common/index.d.ts +11 -0
- package/dist/types/lib/common/log.d.ts +47 -0
- package/dist/types/lib/common/network.d.ts +10 -0
- package/dist/types/lib/common/number.d.ts +13 -0
- package/dist/types/lib/common/promise.d.ts +21 -0
- package/dist/types/lib/common/transport.d.ts +104 -0
- package/dist/types/lib/common/type.d.ts +3 -0
- package/dist/types/lib/dtls/cipher/const.d.ts +42 -0
- package/dist/types/lib/dtls/cipher/create.d.ts +21 -0
- package/dist/types/lib/dtls/cipher/ec.d.ts +28 -0
- package/dist/types/lib/dtls/cipher/key-exchange.d.ts +43 -0
- package/dist/types/lib/dtls/cipher/namedCurve.d.ts +7 -0
- package/dist/types/lib/dtls/cipher/prf.d.ts +17 -0
- package/dist/types/lib/dtls/cipher/suites/abstract.d.ts +40 -0
- package/dist/types/lib/dtls/cipher/suites/aead.d.ts +28 -0
- package/dist/types/lib/dtls/cipher/suites/null.d.ts +24 -0
- package/dist/types/lib/dtls/cipher/utils.d.ts +18 -0
- package/dist/types/lib/dtls/cipher/x509.d.ts +33 -0
- package/dist/types/lib/dtls/client.d.ts +7 -0
- package/dist/types/lib/dtls/context/cipher.d.ts +42 -0
- package/dist/types/lib/dtls/context/dtls.d.ts +38 -0
- package/dist/types/lib/dtls/context/srtp.d.ts +5 -0
- package/dist/types/lib/dtls/context/transport.d.ts +8 -0
- package/dist/types/lib/dtls/flight/client/flight1.d.ts +10 -0
- package/dist/types/lib/dtls/flight/client/flight3.d.ts +8 -0
- package/dist/types/lib/dtls/flight/client/flight5.d.ts +18 -0
- package/dist/types/lib/dtls/flight/flight.d.ts +18 -0
- package/dist/types/lib/dtls/flight/server/flight2.d.ts +6 -0
- package/dist/types/lib/dtls/flight/server/flight4.d.ts +17 -0
- package/dist/types/lib/dtls/flight/server/flight6.d.ts +13 -0
- package/dist/types/lib/dtls/handshake/binary.d.ts +16 -0
- package/dist/types/lib/dtls/handshake/const.d.ts +13 -0
- package/dist/types/lib/dtls/handshake/extensions/ellipticCurves.d.ts +17 -0
- package/dist/types/lib/dtls/handshake/extensions/extendedMasterSecret.d.ts +3 -0
- package/dist/types/lib/dtls/handshake/extensions/renegotiationIndication.d.ts +18 -0
- package/dist/types/lib/dtls/handshake/extensions/signature.d.ts +26 -0
- package/dist/types/lib/dtls/handshake/extensions/useSrtp.d.ts +19 -0
- package/dist/types/lib/dtls/handshake/message/alert.d.ts +12 -0
- package/dist/types/lib/dtls/handshake/message/certificate.d.ts +17 -0
- package/dist/types/lib/dtls/handshake/message/changeCipherSpec.d.ts +11 -0
- package/dist/types/lib/dtls/handshake/message/client/certificateVerify.d.ts +20 -0
- package/dist/types/lib/dtls/handshake/message/client/hello.d.ts +50 -0
- package/dist/types/lib/dtls/handshake/message/client/keyExchange.d.ts +17 -0
- package/dist/types/lib/dtls/handshake/message/finished.d.ts +13 -0
- package/dist/types/lib/dtls/handshake/message/server/certificateRequest.d.ts +31 -0
- package/dist/types/lib/dtls/handshake/message/server/hello.d.ts +33 -0
- package/dist/types/lib/dtls/handshake/message/server/helloDone.d.ts +12 -0
- package/dist/types/lib/dtls/handshake/message/server/helloVerifyRequest.d.ts +32 -0
- package/dist/types/lib/dtls/handshake/message/server/keyExchange.d.ts +32 -0
- package/dist/types/lib/dtls/handshake/random.d.ts +13 -0
- package/dist/types/lib/dtls/helper.d.ts +4 -0
- package/dist/types/lib/dtls/imports/common.d.ts +1 -0
- package/dist/types/lib/dtls/imports/rtp.d.ts +1 -0
- package/dist/types/lib/dtls/index.d.ts +7 -0
- package/dist/types/lib/dtls/record/antiReplayWindow.d.ts +27 -0
- package/dist/types/lib/dtls/record/builder.d.ts +9 -0
- package/dist/types/lib/dtls/record/const.d.ts +33 -0
- package/dist/types/lib/dtls/record/message/fragment.d.ts +26 -0
- package/dist/types/lib/dtls/record/message/header.d.ts +38 -0
- package/dist/types/lib/dtls/record/message/plaintext.d.ts +14 -0
- package/dist/types/lib/dtls/record/receive.d.ts +9 -0
- package/dist/types/lib/dtls/server.d.ts +6 -0
- package/dist/types/lib/dtls/socket.d.ts +52 -0
- package/dist/types/lib/dtls/typings/domain.d.ts +20 -0
- package/dist/types/lib/dtls/util/binary.d.ts +2 -0
- package/dist/types/lib/ice/candidate.d.ts +35 -0
- package/dist/types/lib/ice/dns/lookup.d.ts +16 -0
- package/dist/types/lib/ice/dns/mdns.d.ts +38 -0
- package/dist/types/lib/ice/exceptions.d.ts +24 -0
- package/dist/types/lib/ice/helper.d.ts +17 -0
- package/dist/types/lib/ice/ice.d.ts +182 -0
- package/dist/types/lib/ice/iceBase.d.ts +214 -0
- package/dist/types/lib/ice/imports/common.d.ts +1 -0
- package/dist/types/lib/ice/index.d.ts +12 -0
- package/dist/types/lib/ice/internal/selectAddresses.d.ts +9 -0
- package/dist/types/lib/ice/stun/attributes.d.ts +1 -0
- package/dist/types/lib/ice/stun/const.d.ts +8 -0
- package/dist/types/lib/ice/stun/message.d.ts +1 -0
- package/dist/types/lib/ice/stun/protocol.d.ts +30 -0
- package/dist/types/lib/ice/stun/tcpFrame.d.ts +5 -0
- package/dist/types/lib/ice/stun/tcpProtocol.d.ts +57 -0
- package/dist/types/lib/ice/stun/transaction.d.ts +75 -0
- package/dist/types/lib/ice/turn/frame.d.ts +1 -0
- package/dist/types/lib/ice/turn/protocol.d.ts +170 -0
- package/dist/types/lib/ice/types/model.d.ts +56 -0
- package/dist/types/lib/ice/utils.d.ts +13 -0
- package/dist/types/lib/peer/const.d.ts +36 -0
- package/dist/types/lib/peer/dataChannel.d.ts +69 -0
- package/dist/types/lib/peer/errors.d.ts +11 -0
- package/dist/types/lib/peer/helper.d.ts +20 -0
- package/dist/types/lib/peer/imports/common.d.ts +1 -0
- package/dist/types/lib/peer/imports/dtls.d.ts +1 -0
- package/dist/types/lib/peer/imports/ice.d.ts +1 -0
- package/dist/types/lib/peer/imports/rtp.d.ts +1 -0
- package/dist/types/lib/peer/index.d.ts +14 -0
- package/dist/types/lib/peer/media/codec.d.ts +15 -0
- package/dist/types/lib/peer/media/codecCompatibility.d.ts +23 -0
- package/dist/types/lib/peer/media/extension/rtcpFeedback.d.ts +6 -0
- package/dist/types/lib/peer/media/extension/rtpExtension.d.ts +9 -0
- package/dist/types/lib/peer/media/index.d.ts +12 -0
- package/dist/types/lib/peer/media/parameters.d.ts +65 -0
- package/dist/types/lib/peer/media/receiver/nack.d.ts +23 -0
- package/dist/types/lib/peer/media/receiver/receiverTwcc.d.ts +47 -0
- package/dist/types/lib/peer/media/receiver/statistics.d.ts +22 -0
- package/dist/types/lib/peer/media/router.d.ts +25 -0
- package/dist/types/lib/peer/media/rtpReceiver.d.ts +90 -0
- package/dist/types/lib/peer/media/rtpSender.d.ts +209 -0
- package/dist/types/lib/peer/media/rtpTransceiver.d.ts +117 -0
- package/dist/types/lib/peer/media/sender/cumulativeResult.d.ts +19 -0
- package/dist/types/lib/peer/media/sender/senderBWE.d.ts +32 -0
- package/dist/types/lib/peer/media/stats.d.ts +293 -0
- package/dist/types/lib/peer/media/track.d.ts +67 -0
- package/dist/types/lib/peer/peerConnection.d.ts +458 -0
- package/dist/types/lib/peer/sctpManager.d.ts +28 -0
- package/dist/types/lib/peer/sdp.d.ts +97 -0
- package/dist/types/lib/peer/sdpManager.d.ts +116 -0
- package/dist/types/lib/peer/secureTransportManager.d.ts +96 -0
- package/dist/types/lib/peer/transceiverManager.d.ts +151 -0
- package/dist/types/lib/peer/transport/dtls.d.ts +95 -0
- package/dist/types/lib/peer/transport/ice.d.ts +143 -0
- package/dist/types/lib/peer/transport/sctp.d.ts +56 -0
- package/dist/types/lib/peer/types/domain.d.ts +5 -0
- package/dist/types/lib/peer/types/util.d.ts +2 -0
- package/dist/types/lib/peer/utils.d.ts +73 -0
- package/dist/types/lib/rtp/codec/av1.d.ts +56 -0
- package/dist/types/lib/rtp/codec/base.d.ts +8 -0
- package/dist/types/lib/rtp/codec/h264.d.ts +32 -0
- package/dist/types/lib/rtp/codec/index.d.ts +16 -0
- package/dist/types/lib/rtp/codec/leb128.d.ts +5 -0
- package/dist/types/lib/rtp/codec/opus.d.ts +9 -0
- package/dist/types/lib/rtp/codec/vp8.d.ts +27 -0
- package/dist/types/lib/rtp/codec/vp9.d.ts +46 -0
- package/dist/types/lib/rtp/const.d.ts +1 -0
- package/dist/types/lib/rtp/helper.d.ts +8 -0
- package/dist/types/lib/rtp/imports/common.d.ts +1 -0
- package/dist/types/lib/rtp/index.d.ts +25 -0
- package/dist/types/lib/rtp/rtcp/header.d.ts +13 -0
- package/dist/types/lib/rtp/rtcp/psfb/fullIntraRequest.d.ts +16 -0
- package/dist/types/lib/rtp/rtcp/psfb/index.d.ts +14 -0
- package/dist/types/lib/rtp/rtcp/psfb/pictureLossIndication.d.ts +10 -0
- package/dist/types/lib/rtp/rtcp/psfb/remb.d.ts +16 -0
- package/dist/types/lib/rtp/rtcp/rr.d.ts +32 -0
- package/dist/types/lib/rtp/rtcp/rtcp.d.ts +10 -0
- package/dist/types/lib/rtp/rtcp/rtpfb/const.d.ts +1 -0
- package/dist/types/lib/rtp/rtcp/rtpfb/index.d.ts +14 -0
- package/dist/types/lib/rtp/rtcp/rtpfb/nack.d.ts +17 -0
- package/dist/types/lib/rtp/rtcp/rtpfb/twcc.d.ts +71 -0
- package/dist/types/lib/rtp/rtcp/sdes.d.ts +26 -0
- package/dist/types/lib/rtp/rtcp/sr.d.ts +41 -0
- package/dist/types/lib/rtp/rtp/headerExtension.d.ts +72 -0
- package/dist/types/lib/rtp/rtp/red/encoder.d.ts +13 -0
- package/dist/types/lib/rtp/rtp/red/handler.d.ts +6 -0
- package/dist/types/lib/rtp/rtp/red/packet.d.ts +26 -0
- package/dist/types/lib/rtp/rtp/rtp.d.ts +44 -0
- package/dist/types/lib/rtp/rtp/rtx.d.ts +3 -0
- package/dist/types/lib/rtp/srtp/cipher/ctr.d.ts +16 -0
- package/dist/types/lib/rtp/srtp/cipher/gcm.d.ts +17 -0
- package/dist/types/lib/rtp/srtp/cipher/index.d.ts +13 -0
- package/dist/types/lib/rtp/srtp/const.d.ts +6 -0
- package/dist/types/lib/rtp/srtp/context/context.d.ts +45 -0
- package/dist/types/lib/rtp/srtp/context/srtcp.d.ts +8 -0
- package/dist/types/lib/rtp/srtp/context/srtp.d.ts +9 -0
- package/dist/types/lib/rtp/srtp/error.d.ts +3 -0
- package/dist/types/lib/rtp/srtp/packet.d.ts +5 -0
- package/dist/types/lib/rtp/srtp/session.d.ts +19 -0
- package/dist/types/lib/rtp/srtp/srtcp.d.ts +8 -0
- package/dist/types/lib/rtp/srtp/srtp.d.ts +9 -0
- package/dist/types/lib/rtp/transport.d.ts +15 -0
- package/dist/types/lib/rtp/util.d.ts +11 -0
- package/dist/types/lib/sctp/chunk.d.ts +164 -0
- package/dist/types/lib/sctp/const.d.ts +17 -0
- package/dist/types/lib/sctp/helper.d.ts +5 -0
- package/dist/types/lib/sctp/imports/common.d.ts +1 -0
- package/dist/types/lib/sctp/index.d.ts +6 -0
- package/dist/types/lib/sctp/param.d.ts +40 -0
- package/dist/types/lib/sctp/sctp.d.ts +210 -0
- package/dist/types/lib/sctp/transport.d.ts +15 -0
- package/dist/types/lib/turn/index.d.ts +9 -0
- package/dist/types/lib/turn/node/server.d.ts +21 -0
- package/dist/types/lib/turn/node/turnServer.d.ts +91 -0
- package/dist/types/lib/turn/protocol.d.ts +47 -0
- package/dist/types/lib/turn/stun/attributes.d.ts +37 -0
- package/dist/types/lib/turn/stun/const.d.ts +28 -0
- package/dist/types/lib/turn/stun/ip.d.ts +12 -0
- package/dist/types/lib/turn/stun/message.d.ts +37 -0
- package/dist/types/lib/turn/turn/auth.d.ts +1 -0
- package/dist/types/lib/turn/turn/frame.d.ts +13 -0
- package/dist/types/lib/turn/turn/protocol.d.ts +147 -0
- package/dist/types/peer/Endpoints.d.ts +75 -0
- package/dist/types/peer/EngineConfig.d.ts +20 -0
- package/dist/types/peer/EngineConnection.d.ts +22 -0
- package/dist/types/peer/Events.d.ts +55 -0
- package/dist/types/peer/MediaCodecs.d.ts +27 -0
- package/dist/types/peer/MediaTrack.d.ts +212 -0
- package/dist/types/peer/PeerChannel.d.ts +248 -0
- package/dist/types/peer/PeerConnection.d.ts +603 -0
- package/dist/types/peer/PeerThreadChannel.d.ts +112 -0
- package/dist/types/peer/PeerThreadProtocol.d.ts +325 -0
- package/dist/types/peer/PeerThreads.d.ts +114 -0
- package/dist/types/peer/PeerWorker.d.ts +6 -0
- package/dist/types/peer/PeerWorkerCode.d.ts +5 -0
- package/dist/types/peer/RemoteConnection.d.ts +314 -0
- package/dist/types/peer/RtpPacket.d.ts +112 -0
- package/dist/types/peer/RtpTransceiver.d.ts +167 -0
- package/dist/types/peer/SignalingClient.d.ts +236 -0
- package/dist/types/protocol/SignalingProtocol.d.ts +266 -0
- package/dist/types/service/WebRTCServiceEntrypoint.d.ts +158 -0
- package/dist/types/sfu/SFU.d.ts +356 -0
- package/dist/types/sfu/SFUAccess.d.ts +48 -0
- package/dist/types/sfu/SFUClusterLeg.d.ts +101 -0
- package/dist/types/sfu/SFURoom.d.ts +148 -0
- package/dist/types/sfu/SFUWorker.d.ts +13 -0
- package/dist/types/sfu/SFUWorkerChannel.d.ts +204 -0
- package/dist/types/sfu/SFUWorkerCode.d.ts +5 -0
- package/dist/types/sfu/SFUWorkers.d.ts +247 -0
- package/dist/types/shared/ChunkedChannel.d.ts +122 -0
- package/dist/types/shared/Connections.d.ts +231 -0
- package/dist/types/shared/Emitter.d.ts +50 -0
- package/dist/types/shared/Peer.d.ts +182 -0
- package/dist/types/shared/PeerServiceProxy.d.ts +173 -0
- package/dist/types/shared/Room.d.ts +143 -0
- package/dist/types/shared/SignalingError.d.ts +40 -0
- package/dist/types/shared/SignalingSession.d.ts +97 -0
- package/dist/types/shared/Transports.d.ts +139 -0
- package/dist/types/signaling/MediaServers.d.ts +40 -0
- package/dist/types/signaling/Signaling.d.ts +573 -0
- package/dist/types/signaling/SignalingController.d.ts +128 -0
- package/dist/types/turn/TURNCredentials.d.ts +49 -0
- package/dist/types/turn/TURNIceServers.d.ts +11 -0
- package/dist/types/turn/TURNServer.d.ts +309 -0
- package/dist/types/turn/TURNWorker.d.ts +42 -0
- package/dist/types/turn/TURNWorkerCode.d.ts +5 -0
- package/dist/types/turn/TURNWorkers.d.ts +52 -0
- package/dist/types/whep/WHEP.d.ts +386 -0
- package/dist/types/whep/WHEPController.d.ts +134 -0
- package/dist/types/whip/WHIP.d.ts +426 -0
- package/dist/types/whip/WHIPController.d.ts +132 -0
- package/package.json +115 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Lakutata
|
|
4
|
+
|
|
5
|
+
All rights reserved
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,510 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lakutata/webrtc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
WebRTC for the [lakutata](https://www.npmjs.com/package/lakutata) framework, written in TypeScript with no native code:
|
|
6
|
+
it installs without a compiler and runs in Node.js, the main process of Electron and Bun. It has two entry points:
|
|
7
|
+
|
|
8
|
+
- `@lakutata/webrtc`, for the applications: the signaling (rooms whose members exchange their offers, answers and
|
|
9
|
+
candidates), a STUN and TURN server, a media server (SFU) for the rooms of many members, publishing with WHIP and
|
|
10
|
+
playing with WHEP, and the peer connections of Node.js (data channels, audio and video tracks), with the same
|
|
11
|
+
interface as `RTCPeerConnection` in the browsers. The members of the rooms an application joins can call its service
|
|
12
|
+
actions through data channels. The instances of an application work together through NATS or Redis, their media
|
|
13
|
+
servers included.
|
|
14
|
+
- `@lakutata/webrtc/client`, for the browsers and the renderer of Electron: it connects the browser's own
|
|
15
|
+
`RTCPeerConnection` to the signaling. It uses only the browser's APIs, so a frontend bundling it gets no server code.
|
|
16
|
+
|
|
17
|
+
The implementation of the protocols (ICE, DTLS, SCTP and the data channels, RTP and SRTP, the STUN and TURN server) is
|
|
18
|
+
derived from [werift](https://github.com/shinyoshiaki/werift-webrtc); see `THIRD_PARTY_NOTICES.md`.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
npm install @lakutata/webrtc
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
An application also needs `lakutata` (or `@lakutata/core` and `@lakutata/entrypoint`). The signaling is served over
|
|
27
|
+
Socket.IO (`npm install socket.io`) or JSON-RPC over WebSocket (`npm install ws`), through the adapters of the
|
|
28
|
+
entrypoint. An application joining rooms over Socket.IO needs `socket.io-client`; over JSON-RPC, it uses the
|
|
29
|
+
`WebSocket` built into Node.js 22 and Bun. Instances working together need `nats` or `ioredis`.
|
|
30
|
+
|
|
31
|
+
A frontend installs the same package and imports `@lakutata/webrtc/client`; the framework is not installed with it.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
The server: the signaling, a TURN server, and the controller of the signaling on the entrypoint.
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import {Application} from 'lakutata'
|
|
39
|
+
import {buildEntrypoints} from 'lakutata/com/entrypoint'
|
|
40
|
+
import {socketIOServiceEntrypoint} from 'lakutata/adapter/socket.io'
|
|
41
|
+
import {buildSignalingOptions, buildTURNServerOptions, SignalingController} from '@lakutata/webrtc'
|
|
42
|
+
|
|
43
|
+
Application.run(() => ({
|
|
44
|
+
id: 'meet.app',
|
|
45
|
+
name: 'Meet',
|
|
46
|
+
components: {
|
|
47
|
+
//STUN and TURN on port 3478 (UDP and TCP), the relays on ports 49160 to 49200
|
|
48
|
+
turn: buildTURNServerOptions({publicAddress: '203.0.113.10', relayPortRange: [49160, 49200], secret: process.env.TURN_SECRET}),
|
|
49
|
+
//The members of the rooms get the ICE servers of turn, with credentials valid for a day
|
|
50
|
+
signaling: buildSignalingOptions({turn: 'turn'}),
|
|
51
|
+
entrypoint: buildEntrypoints({
|
|
52
|
+
controllers: [SignalingController],
|
|
53
|
+
service: socketIOServiceEntrypoint({port: 3000})
|
|
54
|
+
})
|
|
55
|
+
},
|
|
56
|
+
bootstrap: ['turn', 'entrypoint']
|
|
57
|
+
}))
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
A browser: it joins a room and opens a data channel to each other member.
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import {io} from 'socket.io-client'
|
|
64
|
+
import {type Peer, type Room, SignalingConnection} from '@lakutata/webrtc/client'
|
|
65
|
+
|
|
66
|
+
//The member's id is the auth.id of its Socket.IO connection
|
|
67
|
+
const signaling: SignalingConnection = new SignalingConnection(io('https://meet.example.com', {auth: {id: 'alice'}}))
|
|
68
|
+
const room: Room = await signaling.join('room-1', {metadata: {name: 'Alice'}})
|
|
69
|
+
room.on('peer', (peer: Peer): void => {
|
|
70
|
+
const channel: RTCDataChannel = peer.createDataChannel('chat')
|
|
71
|
+
channel.addEventListener('open', (): void => channel.send(`hello ${peer.id}`))
|
|
72
|
+
peer.on('datachannel', (remote: RTCDataChannel): void => {
|
|
73
|
+
remote.addEventListener('message', (event: MessageEvent): void => console.log(peer.id, event.data))
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
room.on('peer-left', (peer: Peer): void => console.log(`${peer.id} left`))
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
An application as a member: a device sending its readings to whoever joins its room.
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import {Component} from 'lakutata'
|
|
83
|
+
import {type Peer, type PeerChannel, type Room, SignalingClient} from '@lakutata/webrtc'
|
|
84
|
+
|
|
85
|
+
export class Telemetry extends Component {
|
|
86
|
+
protected async init(): Promise<void> {
|
|
87
|
+
const signaling: SignalingClient = await this.getObject(SignalingClient, {url: 'https://meet.example.com', id: 'device-7'})
|
|
88
|
+
const room: Room = await signaling.join('device-7')
|
|
89
|
+
room.on('peer', (peer: Peer): void => {
|
|
90
|
+
const channel: PeerChannel = peer.createDataChannel('readings')
|
|
91
|
+
const timer: NodeJS.Timeout = setInterval((): void => {
|
|
92
|
+
if (channel.readyState === 'open') channel.send(JSON.stringify({temperature: 21.5}))
|
|
93
|
+
}, 1000)
|
|
94
|
+
peer.on('close', (): void => clearInterval(timer))
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Without the signaling of this package, get a `PeerConnection` (`await this.getObject(PeerConnection, {iceServers})`)
|
|
101
|
+
and exchange the offer, the answer and the candidates yourself, as with `RTCPeerConnection` in a browser. With many
|
|
102
|
+
connections, a `PeerThreads` component runs their engines in worker threads, to use more cores: give its name as their
|
|
103
|
+
`threads` option (an option of `SignalingClient` too).
|
|
104
|
+
|
|
105
|
+
How the rooms behave:
|
|
106
|
+
|
|
107
|
+
- **Connections.** A member gets a `Peer` for each other member, with its connection (`peer.connection`: an
|
|
108
|
+
`RTCPeerConnection` in a browser, a `PeerConnection` in Node.js). The connection is set up when either side adds a
|
|
109
|
+
data channel or a track. The offers and the answers are exchanged as in the W3C "perfect negotiation": both sides may
|
|
110
|
+
add channels and tracks at any time, even at the same moment. Use `negotiated: true` with the same `id` on both sides
|
|
111
|
+
for a single shared channel.
|
|
112
|
+
- **Repairs.** A connection that fails, or stays disconnected for 5 seconds, restarts ICE by itself. When the signaling
|
|
113
|
+
connection drops, the peer-to-peer connections stay up; once it is back, the client joins its rooms again and the
|
|
114
|
+
other members keep their connections to it. A member that reloads its page joins as a new session, and the other
|
|
115
|
+
members replace their connections to it.
|
|
116
|
+
- **Leaving.** `room.leave()` closes the room's connections; the other members get `peer-left`. A member whose
|
|
117
|
+
signaling connection closes (Socket.IO, or JSON-RPC over WebSocket) leaves its rooms; its peer-to-peer connections
|
|
118
|
+
stay up until it comes back or they fail.
|
|
119
|
+
- **ICE servers.** The members get the ICE servers from the server when they join, with TURN credentials valid for
|
|
120
|
+
`credentialTtl` (a day by default), and fetch new ones before they expire. A relay keeps working after the
|
|
121
|
+
credentials it was made with expire.
|
|
122
|
+
- **Checks.** A member signals only to the members of its rooms; the signals are limited in size (64 KiB) and in rate
|
|
123
|
+
(50 per second on average), and the `authorize` option decides who joins which room.
|
|
124
|
+
|
|
125
|
+
Large messages: a data channel carries messages of up to 64 KiB with any peer; Chrome and the connections of this
|
|
126
|
+
package accept up to 256 KiB. A `ChunkedChannel` on both sides cuts the messages into chunks and puts them back
|
|
127
|
+
together, for messages and files of any size:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import {ChunkedChannel, type PeerChannel} from '@lakutata/webrtc'
|
|
131
|
+
|
|
132
|
+
declare const channel: PeerChannel
|
|
133
|
+
const transfer: ChunkedChannel = new ChunkedChannel(channel)
|
|
134
|
+
transfer.on('message', (data: string | Uint8Array): void => console.log(`${data.length} received`))
|
|
135
|
+
await transfer.send(new Uint8Array(50 * 1024 * 1024))
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Calling the actions of an application: `webrtcServiceEntrypoint()` serves the service actions (`@ServiceAction`) of
|
|
139
|
+
an application to the members of its rooms, through data channels to it, with their input validation and access
|
|
140
|
+
control. The calls are JSON-RPC 2.0 messages; a member makes them with `PeerServiceProxy`:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import {Application} from 'lakutata'
|
|
144
|
+
import {buildEntrypoints, Controller} from 'lakutata/com/entrypoint'
|
|
145
|
+
import {ServiceAction} from 'lakutata/decorator/ctrl'
|
|
146
|
+
import {PeerServiceProxy, webrtcServiceEntrypoint, type Peer} from '@lakutata/webrtc'
|
|
147
|
+
|
|
148
|
+
class DoorController extends Controller {
|
|
149
|
+
@ServiceAction({method: 'door.open'})
|
|
150
|
+
public async open(input: {door: string}): Promise<string> {
|
|
151
|
+
return `${input.door} is open`
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
//The device: the member door-7 of the room door-7
|
|
156
|
+
Application.run({
|
|
157
|
+
id: 'door.device',
|
|
158
|
+
name: 'Door',
|
|
159
|
+
components: {
|
|
160
|
+
entrypoint: buildEntrypoints({
|
|
161
|
+
controllers: [DoorController],
|
|
162
|
+
service: webrtcServiceEntrypoint({signaling: {url: 'https://meet.example.com', id: 'door-7'}, rooms: ['door-7']})
|
|
163
|
+
})
|
|
164
|
+
},
|
|
165
|
+
bootstrap: ['entrypoint']
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
//Another member of the room (a browser imports PeerServiceProxy from @lakutata/webrtc/client)
|
|
169
|
+
declare const peer: Peer
|
|
170
|
+
const door: PeerServiceProxy = new PeerServiceProxy(peer.createDataChannel('service'))
|
|
171
|
+
console.log(await door.invoke({method: 'door.open', door: 'front'}))
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
A call's client id is the member id of the caller: have the signaling server authenticate its clients before the
|
|
175
|
+
actions rely on it.
|
|
176
|
+
|
|
177
|
+
Audio and video: a browser publishes the tracks of its camera and microphone in the room, and gets the tracks of each
|
|
178
|
+
other member with the `track` event of its peer.
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import {type Peer, type Room} from '@lakutata/webrtc/client'
|
|
182
|
+
|
|
183
|
+
declare const room: Room
|
|
184
|
+
declare const remoteVideo: HTMLVideoElement
|
|
185
|
+
const camera: MediaStream = await navigator.mediaDevices.getUserMedia({audio: true, video: true})
|
|
186
|
+
for (const track of camera.getTracks()) await room.publish(track, camera)
|
|
187
|
+
room.on('peer', (peer: Peer): void => {
|
|
188
|
+
peer.on('track', (event: RTCTrackEvent): void => {
|
|
189
|
+
remoteVideo.srcObject = event.streams[0]
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Node.js captures, encodes and decodes nothing: the tracks of an application carry RTP packets, the encoded audio and
|
|
195
|
+
video. A `MediaTrack` to send gets the packets of an encoder (ffmpeg, GStreamer) with `writeRtp()`; a received track
|
|
196
|
+
gives the packets of the other member with its `rtp` event, to record or decode them, and `requestKeyFrame()` asks for
|
|
197
|
+
a key frame. A received track added to another connection forwards its packets there, and the key frame requests of
|
|
198
|
+
that connection go back to its sender. A camera sending what ffmpeg encodes:
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import {createSocket, type Socket} from 'node:dgram'
|
|
202
|
+
import {Component} from 'lakutata'
|
|
203
|
+
import {MediaTrack, type Room, SignalingClient} from '@lakutata/webrtc'
|
|
204
|
+
|
|
205
|
+
//ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -profile:v baseline -pix_fmt yuv420p -tune zerolatency -g 30
|
|
206
|
+
// -bsf:v dump_extra=freq=keyframe -f rtp rtp://127.0.0.1:5004
|
|
207
|
+
export class Camera extends Component {
|
|
208
|
+
protected async init(): Promise<void> {
|
|
209
|
+
const video: MediaTrack = new MediaTrack('video', {codec: 'video/H264'})
|
|
210
|
+
const socket: Socket = createSocket('udp4')
|
|
211
|
+
socket.on('message', (datagram: Buffer): void => video.writeRtp(datagram))
|
|
212
|
+
socket.bind(5004)
|
|
213
|
+
const signaling: SignalingClient = await this.getObject(SignalingClient, {url: 'https://meet.example.com', id: 'camera-3'})
|
|
214
|
+
const room: Room = await signaling.join('camera-3')
|
|
215
|
+
await room.publish(video, 'camera-3')
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
A viewer starts decoding at a key frame: give the encoder a key frame every second or two (`-g` of ffmpeg), or have the
|
|
221
|
+
encoder make one when the track emits `keyframerequest`, if it can. The codecs are Opus and PCMU for the audio, VP8,
|
|
222
|
+
H.264 and VP9 for the video (the `codecs` option of `PeerConnection` and of `SignalingClient`).
|
|
223
|
+
|
|
224
|
+
A media server for the rooms of many members: without one, each member sends its video once per other member. The `SFU`
|
|
225
|
+
component joins the rooms it serves, and the clients connect to it only: each one sends its tracks once, and receives
|
|
226
|
+
the tracks of the others from the server, which forwards their packets without decoding them. The rooms and the peers
|
|
227
|
+
work as without it (`room.publish()`, the `track` events of the peers, `peer.createDataChannel()`, whose messages the
|
|
228
|
+
server relays and sees), so the code of the clients does not change.
|
|
229
|
+
|
|
230
|
+
```typescript
|
|
231
|
+
import {Application} from 'lakutata'
|
|
232
|
+
import {buildEntrypoints} from 'lakutata/com/entrypoint'
|
|
233
|
+
import {socketIOServiceEntrypoint} from 'lakutata/adapter/socket.io'
|
|
234
|
+
import {buildSFUOptions, buildSignalingOptions, SignalingController} from '@lakutata/webrtc'
|
|
235
|
+
|
|
236
|
+
Application.run(() => ({
|
|
237
|
+
id: 'meet.app',
|
|
238
|
+
name: 'Meet',
|
|
239
|
+
components: {
|
|
240
|
+
signaling: buildSignalingOptions(),
|
|
241
|
+
//The meetings through the media server, its connections on the UDP ports 40000 to 40999
|
|
242
|
+
sfu: buildSFUOptions({
|
|
243
|
+
serves: (room: string): boolean => room.startsWith('meeting-'),
|
|
244
|
+
iceAdditionalHostAddresses: ['203.0.113.10'],
|
|
245
|
+
icePortRange: [40000, 40999]
|
|
246
|
+
}),
|
|
247
|
+
entrypoint: buildEntrypoints({
|
|
248
|
+
controllers: [SignalingController],
|
|
249
|
+
service: socketIOServiceEntrypoint({port: 3000})
|
|
250
|
+
})
|
|
251
|
+
},
|
|
252
|
+
bootstrap: ['sfu', 'entrypoint']
|
|
253
|
+
}))
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
`select` decides which member receives which track, `peer.pause()` and `peer.resume()` stop and start a track,
|
|
257
|
+
`sfu.track()` gives the packets of a track (to record it), and `workers` forwards the rooms in worker threads, to use
|
|
258
|
+
more cores. The server does not transcode: publish the video in VP8 or H.264 for the browsers.
|
|
259
|
+
|
|
260
|
+
Publishing with WHIP (RFC 9725): encoders (OBS, GStreamer, ffmpeg) and browsers publish a stream with an HTTP POST of
|
|
261
|
+
their offer. The `WHIP` component answers them, emits `publish` with the session (its connection and its tracks), and
|
|
262
|
+
`unpublish` when it ends; `WHIPController` serves `/whip/:stream`. With its option `sfu`, a stream goes to a room of
|
|
263
|
+
the media server instead, as one of its members.
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
import {Application, Component} from 'lakutata'
|
|
267
|
+
import {buildEntrypoints} from 'lakutata/com/entrypoint'
|
|
268
|
+
import {expressHTTPEntrypoint} from 'lakutata/adapter/express'
|
|
269
|
+
import {buildWHIPOptions, type MediaTrack, type WHIP, type WHIPSession, WHIPController} from '@lakutata/webrtc'
|
|
270
|
+
|
|
271
|
+
export class Studio extends Component {
|
|
272
|
+
protected async init(): Promise<void> {
|
|
273
|
+
const whip: WHIP = await this.getObject<WHIP>('whip')
|
|
274
|
+
whip.on('publish', (session: WHIPSession): void => {
|
|
275
|
+
session.tracks?.forEach((track: MediaTrack): void => console.log(`${session.stream}: ${track.kind} ${track.codec}`))
|
|
276
|
+
})
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
Application.run(() => ({
|
|
281
|
+
id: 'studio.app',
|
|
282
|
+
name: 'Studio',
|
|
283
|
+
components: {
|
|
284
|
+
//OBS: the service WHIP, the server https://studio.example.com/whip/live, and the bearer token
|
|
285
|
+
whip: buildWHIPOptions({authorize: ({token}): boolean => token === process.env.WHIP_TOKEN}),
|
|
286
|
+
studio: {class: Studio},
|
|
287
|
+
entrypoint: buildEntrypoints({
|
|
288
|
+
controllers: [WHIPController],
|
|
289
|
+
//The offers come as application/sdp, read as text
|
|
290
|
+
http: expressHTTPEntrypoint({port: 8080, body: {text: ['application/sdp', 'application/trickle-ice-sdpfrag']}})
|
|
291
|
+
})
|
|
292
|
+
},
|
|
293
|
+
bootstrap: ['studio', 'entrypoint']
|
|
294
|
+
}))
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
The answers carry all the candidates of the server: give it its public address (`iceAdditionalHostAddresses`) and the
|
|
298
|
+
UDP ports to open (`icePortRange`). A `PATCH` of a session gives the server the candidates of the publisher (trickle
|
|
299
|
+
ICE) or restarts ICE; list `application/trickle-ice-sdpfrag` in `body.text` too, or Fastify refuses it with 415 before
|
|
300
|
+
it reaches the controller.
|
|
301
|
+
ffmpeg publishes with `-f whip -authorization <token> <url>`.
|
|
302
|
+
|
|
303
|
+
Playing with WHEP: a player posts a receive-only offer to `/whep/:stream` (`WHEPController`), and the `WHEP`
|
|
304
|
+
component sends it the audio and the video of a member of the room of the media server: by default the stream
|
|
305
|
+
published into it with WHIP, or the member `select` chooses. The viewers are not members of the room, and a stream may
|
|
306
|
+
have many of them.
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import {buildSFUOptions, buildSignalingOptions, buildWHEPOptions, buildWHIPOptions} from '@lakutata/webrtc'
|
|
310
|
+
|
|
311
|
+
//OBS publishes to /whip/concert, the browsers play /whep/concert (WHIPController and WHEPController)
|
|
312
|
+
const components = {
|
|
313
|
+
signaling: buildSignalingOptions(),
|
|
314
|
+
sfu: buildSFUOptions({icePortRange: [40000, 40999]}),
|
|
315
|
+
whip: buildWHIPOptions({sfu: 'sfu', authorize: ({token}): boolean => token === process.env.WHIP_TOKEN}),
|
|
316
|
+
whep: buildWHEPOptions({maxSessions: 500})
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Several instances of an application (the pods of a deployment) work together through a `Cluster`: each instance is a
|
|
321
|
+
node, and the nodes talk through NATS or Redis. Given its name, the signaling puts the members connected to all the
|
|
322
|
+
nodes in the same rooms, the TURN servers tell the other nodes their address and their load, the media servers share
|
|
323
|
+
the rooms (each member connects to the media server of one node, and the nodes of a room forward its tracks to each
|
|
324
|
+
other), and a session of WHIP or WHEP is ended or patched whichever node its DELETE or PATCH reaches. The bus carries
|
|
325
|
+
only these messages: the audio, the video and the data go directly between the clients and the nodes, and between the
|
|
326
|
+
media servers.
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
import {Application} from 'lakutata'
|
|
330
|
+
import {buildEntrypoints} from 'lakutata/com/entrypoint'
|
|
331
|
+
import {socketIOServiceEntrypoint} from 'lakutata/adapter/socket.io'
|
|
332
|
+
import {buildClusterOptions, buildSignalingOptions, SignalingController} from '@lakutata/webrtc'
|
|
333
|
+
|
|
334
|
+
Application.run(() => ({
|
|
335
|
+
id: 'meet.app',
|
|
336
|
+
name: 'Meet',
|
|
337
|
+
components: {
|
|
338
|
+
//npm install nats; or {type: 'redis', url: process.env.REDIS_URL} with npm install ioredis
|
|
339
|
+
cluster: buildClusterOptions({transport: {type: 'nats', servers: process.env.NATS_URL}}),
|
|
340
|
+
//Each member gets the two least loaded TURN servers of the cluster, which share this secret
|
|
341
|
+
signaling: buildSignalingOptions({cluster: 'cluster', turnSecret: process.env.TURN_SECRET}),
|
|
342
|
+
entrypoint: buildEntrypoints({
|
|
343
|
+
controllers: [SignalingController],
|
|
344
|
+
service: socketIOServiceEntrypoint({port: 3000})
|
|
345
|
+
})
|
|
346
|
+
},
|
|
347
|
+
bootstrap: ['signaling', 'entrypoint']
|
|
348
|
+
}))
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
A TURN server joins the cluster with its `cluster` option and the shared `secret`. The members of a node that stops,
|
|
352
|
+
or that the other nodes cannot reach for three heartbeats, leave their rooms as `disconnected`: their connections stay
|
|
353
|
+
up while their clients reconnect to another node. The members connected to the media server of such a node move to
|
|
354
|
+
the media server of another one, and their peers open again on every side, as when a member reloads its page.
|
|
355
|
+
`maxPeers` counts the members of all the nodes; `maxMembers` of the media server, and `maxSessions` of WHIP and WHEP,
|
|
356
|
+
count those of each node.
|
|
357
|
+
|
|
358
|
+
## Deployment
|
|
359
|
+
|
|
360
|
+
- **Ports.** The TURN server listens on port 3478 over UDP and TCP (and over TLS when given a certificate); the
|
|
361
|
+
relays use the UDP ports of `relayPortRange`. Open them in the firewall, or publish them from the container.
|
|
362
|
+
- **Addresses.** `publicAddress` is the address the clients reach the server at: the public address of the host, or of
|
|
363
|
+
its NAT when the NAT forwards the ports. By default it is the first IPv4 address of the host that is not internal,
|
|
364
|
+
which is enough on a local network.
|
|
365
|
+
- **The media server.** The clients connect to it directly: open its `icePortRange` over UDP, and give it the public
|
|
366
|
+
address of a NAT forwarding these ports in `iceAdditionalHostAddresses`. The same goes for WHIP and WHEP.
|
|
367
|
+
- **Several instances.** Give them a `Cluster` (see above), and their TURN servers the same `secret`. Behind a load
|
|
368
|
+
balancer, Socket.IO needs sticky sessions, unless the clients connect with `transports: ['websocket']`. In
|
|
369
|
+
Kubernetes, run a TURN server and a media server on the network of each node (DaemonSets with `hostNetwork`); the
|
|
370
|
+
guide has the manifests.
|
|
371
|
+
- **Another TURN server.** A coturn configured with `use-auth-secret` and the same secret accepts the credentials of
|
|
372
|
+
this package: list it in the `iceServers` option of `Signaling`.
|
|
373
|
+
|
|
374
|
+
## Signaling protocol
|
|
375
|
+
|
|
376
|
+
The requests are service calls whose pattern is `{method}`: over Socket.IO, the event `message` with
|
|
377
|
+
`{method: 'webrtc.join', room: 'room-1'}` and an acknowledgement; over JSON-RPC, a request whose method is
|
|
378
|
+
`webrtc.join`. The member's id is the client id of its connection (the `auth.id` of Socket.IO, the `id` query
|
|
379
|
+
parameter or header of the WebSocket). The server pushes the events to the members: Socket.IO events, or JSON-RPC
|
|
380
|
+
notifications whose `params` hold the payload.
|
|
381
|
+
|
|
382
|
+
| Request | Parameters | Answer |
|
|
383
|
+
|---|---|---|
|
|
384
|
+
| `webrtc.join` | `room`, `metadata`, `session` | `{v, peerId, peers, iceServers, credentialTtl, heartbeatInterval, sfu}` |
|
|
385
|
+
| `webrtc.signal` | `room`, `to`, `description` or `candidate` | `{delivered}` |
|
|
386
|
+
| `webrtc.leave` | `room` | `{}` |
|
|
387
|
+
| `webrtc.iceServers` | — | `{iceServers, credentialTtl}` |
|
|
388
|
+
| `webrtc.heartbeat` | — | `{}` |
|
|
389
|
+
|
|
390
|
+
| Event | Payload |
|
|
391
|
+
|---|---|
|
|
392
|
+
| `webrtc:peer-joined` | `{room, peerId, metadata, session, role, sfu}` |
|
|
393
|
+
| `webrtc:peer-left` | `{room, peerId, reason}`: `left`, or `disconnected` |
|
|
394
|
+
| `webrtc:signal` | `{room, from, session, description, streams}` or `{room, from, session, candidate}` |
|
|
395
|
+
|
|
396
|
+
A client sends `webrtc.heartbeat` every `heartbeatInterval` milliseconds when it is not 0: over a transport whose
|
|
397
|
+
disconnections the server cannot see (Socket.IO and JSON-RPC over WebSocket answer 0). The `session` is a random
|
|
398
|
+
string the client chooses once: joining again with the same session keeps the other members' connections. In a room
|
|
399
|
+
with a media server, `sfu` is the id of the media server the client connects to (its `role` is `sfu`), and the
|
|
400
|
+
descriptions of the server carry `streams`, the member each stream comes from; the guide describes the data channels
|
|
401
|
+
of the media server.
|
|
402
|
+
|
|
403
|
+
## Limits
|
|
404
|
+
|
|
405
|
+
- Node.js does not capture, encode or decode audio and video: its tracks carry RTP packets, from an encoder or from
|
|
406
|
+
another connection.
|
|
407
|
+
- Throughput of one data channel between two Node.js processes on an Apple M4: about 80 MiB/s for large messages,
|
|
408
|
+
626,000 messages of 100 bytes per second (in an arm64 Linux virtual machine on the same Mac: about 43 MiB/s and
|
|
409
|
+
548,000 messages).
|
|
410
|
+
- The media server on an Apple M4: its main thread forwards about 87,000 packets per second (the equivalent of 435
|
|
411
|
+
videos of 2 Mbit/s), and 4 worker threads forwarded the 92,000 of a test on 1.7 cores. It does not transcode, and
|
|
412
|
+
sends each video as published (no simulcast yet).
|
|
413
|
+
|
|
414
|
+
## API
|
|
415
|
+
|
|
416
|
+
| Export | Description |
|
|
417
|
+
|---|---|
|
|
418
|
+
| `Signaling`, `buildSignalingOptions` | The component of the rooms: members, signals, limits, `authorize`, the ICE servers |
|
|
419
|
+
| `Cluster`, `buildClusterOptions` | The instances working together through NATS or Redis: `nodes()`, `publish()`, `request()`, `announce()` |
|
|
420
|
+
| `SignalingController` | The controller serving the signaling over Socket.IO and JSON-RPC |
|
|
421
|
+
| `TURNServer`, `buildTURNServerOptions` | The STUN and TURN server: `iceServers()`, `credentials()`, `allocations` |
|
|
422
|
+
| `createTURNCredentials` | Short-lived TURN credentials (the REST API of coturn) |
|
|
423
|
+
| `SignalingClient` | An application as a member of the rooms: `join()`, `close()` |
|
|
424
|
+
| `PeerConnection`, `PeerChannel` | The peer connection and the data channel of Node.js |
|
|
425
|
+
| `PeerThreads`, `buildPeerThreadsOptions` | Worker threads running the engines of the connections whose `threads` option names it |
|
|
426
|
+
| `MediaTrack`, `RtpPacket` | An audio or video track of Node.js, and its RTP packets |
|
|
427
|
+
| `RtpTransceiver`, `RtpSender`, `RtpReceiver` | The audio and video lines of a connection |
|
|
428
|
+
| `WHIP`, `buildWHIPOptions` | The ingestion of WHIP: the sessions, the `publish` and `unpublish` events |
|
|
429
|
+
| `WHIPController` | The HTTP interface of WHIP: `/whip/:stream` |
|
|
430
|
+
| `SFU`, `buildSFUOptions` | The media server of the rooms: `rooms()`, `track()`, the `publish`, `unpublish`, `unsupported` and `congestion` events |
|
|
431
|
+
| `WHEP`, `buildWHEPOptions` | Playing the rooms of the media server with WHEP: the sessions, the `play` and `stop` events |
|
|
432
|
+
| `WHEPController` | The HTTP interface of WHEP: `/whep/:stream` |
|
|
433
|
+
| `Room`, `Peer` | A room joined, and another member with the connection to it |
|
|
434
|
+
| `ChunkedChannel` | Messages of any size over a data channel |
|
|
435
|
+
| `webrtcServiceEntrypoint`, `webrtcRequestOfContext` | The service actions of an application called through the data channels of its rooms, and the member behind a call |
|
|
436
|
+
| `PeerServiceProxy`, `PeerServiceError` (also `/client`) | The calls of these actions: `invoke()`, and `on()` for the events pushed |
|
|
437
|
+
| `setDebugHandler` | The debug messages of ICE, DTLS, SCTP and TURN |
|
|
438
|
+
| `SignalingMethod`, `SignalingEvent` | The names of the requests and of the events of the protocol |
|
|
439
|
+
| `SignalingConnection` (`/client`) | The signaling of a browser: `join()`, `close()` |
|
|
440
|
+
|
|
441
|
+
## Errors
|
|
442
|
+
|
|
443
|
+
| Exception | When |
|
|
444
|
+
|---|---|
|
|
445
|
+
| `SignalingDeniedException` | `authorize` refuses the room |
|
|
446
|
+
| `SignalingLimitException` | A full room, a member no media server takes, a signal too large, too many signals |
|
|
447
|
+
| `SignalingNotAMemberException` | A signal from or to someone who is not in the room |
|
|
448
|
+
| `SignalingClientRequiredException` | A request without a connection to push the events through (HTTP), or through a data channel of `webrtcServiceEntrypoint` |
|
|
449
|
+
| `SignalingConnectionException` | `SignalingClient` without `socket.io-client`, or without `WebSocket` |
|
|
450
|
+
| `WHIPDeniedException` | `authorize` refuses the stream (401) |
|
|
451
|
+
| `WHIPLimitException` | `maxSessions` sessions already (503) |
|
|
452
|
+
| `WHIPOfferException` | An offer without audio or video, or that the connection refuses (400) |
|
|
453
|
+
| `WHIPMediaTypeException` | An offer that is not `application/sdp` (415) |
|
|
454
|
+
| `WHIPSessionNotFoundException` | A request for a session that does not exist (404) |
|
|
455
|
+
| `WHEPDeniedException` | `authorize` refuses the stream (401) |
|
|
456
|
+
| `WHEPLimitException` | `maxSessions` sessions already (503) |
|
|
457
|
+
| `WHEPOfferException` | An offer without audio or video, of a room the media server does not serve, or that the connection refuses (400) |
|
|
458
|
+
| `WHEPMediaTypeException` | An offer that is not `application/sdp` (415) |
|
|
459
|
+
| `WHEPSessionNotFoundException` | A request for a session that does not exist (404) |
|
|
460
|
+
| `ClusterRequestException` | `Cluster.request()` to a node not in the cluster, without a handler, or whose handler failed |
|
|
461
|
+
| `ClusterTimeoutException` | `Cluster.request()` not answered in time |
|
|
462
|
+
| `ClusterTransportNotFoundException` | A cluster on NATS or Redis without the package `nats` or `ioredis` |
|
|
463
|
+
| `SignalingRequestError` | On the clients: the error of a request, with the `errno` of the server's exception |
|
|
464
|
+
| `PeerServiceError` | On the members: the error of a call of `PeerServiceProxy`, with the `errno` of the action's error, or `E_PEER_SERVICE_TIMEOUT`, `E_PEER_SERVICE_CLOSED`, `E_PEER_SERVICE_TOO_LARGE` |
|
|
465
|
+
|
|
466
|
+
## Testing
|
|
467
|
+
|
|
468
|
+
`npm run test:unit` runs the tests of the protocols, of the signaling and of the connections between Node.js
|
|
469
|
+
processes. The tests with browsers use Playwright: the Chrome installed on the machine, and the Firefox and WebKit of
|
|
470
|
+
Playwright (`npx playwright install firefox webkit`). They run when the package `playwright` can be imported (or is
|
|
471
|
+
found in the directory given by `LAKUTATA_PLAYWRIGHT`); the ones of a browser not installed are skipped. The one
|
|
472
|
+
sending the H.264 of an encoder also needs `ffmpeg` with `libx264` and a browser with H.264 (the Firefox of Playwright
|
|
473
|
+
has none), and the ones of WHIP need an `ffmpeg` with its WHIP muxer (FFmpeg 8 and later) and `libopus`. The WebKit of
|
|
474
|
+
Playwright refuses the URLs of TURN with a transport (`?transport=udp`), which Safari accepts: its test through the
|
|
475
|
+
relay only is skipped.
|
|
476
|
+
|
|
477
|
+
The other runtimes and implementations, compiled first (`npm run compile`):
|
|
478
|
+
|
|
479
|
+
- `npm run test:bun` runs the tests in Bun (without those of the browsers). Four tests of the TURN refresh fail there:
|
|
480
|
+
the fake clock of the tests reaches the imports of `node:timers/promises` only in Node.js.
|
|
481
|
+
- `npm run test:electron` runs them in the main process of Electron (the repository's Electron).
|
|
482
|
+
- `npm run test:linux` runs them, the performance targets and the benchmarks of forwarding, of the TURN server and of
|
|
483
|
+
the worker threads of the connections, in Linux (`node:24-alpine` in Docker).
|
|
484
|
+
- `npm run test:interop` connects Pion (Go) and aiortc (Python), in Docker, to the signaling, the TURN server and a
|
|
485
|
+
member of this package: a data channel directly and through the relay only, and a call of a service action from
|
|
486
|
+
aiortc; then the same again, with the engines of the member's connections in worker threads.
|
|
487
|
+
- `node test-env/safari.mjs` opens a page in Safari (macOS): a data channel, a service call, a connection through the
|
|
488
|
+
relay only. Close its tab afterwards.
|
|
489
|
+
|
|
490
|
+
`npm run test:servers` runs the tests of the cluster on NATS and Redis, started in Docker (`test-env/cluster.sh`).
|
|
491
|
+
`test-env/k3s/run.sh` runs k3s in Docker with two nodes, deploys the signaling, and a TURN server and a media server on
|
|
492
|
+
each node. It connects two members through two different pods and the TURN servers only, then two members through the
|
|
493
|
+
media servers of the two nodes, and deletes the pod of one of these media servers.
|
|
494
|
+
|
|
495
|
+
The benchmarks are in `test-env/bench` and run on the compiled package (`npm run compile` first). `targets.mjs` measures
|
|
496
|
+
the engine against its performance targets (70 MiB/s for large messages, at 40 s of CPU per GiB at most; 50,000 messages
|
|
497
|
+
of 100 bytes a second; 200 connections set up in 2 seconds) and exits with 1 when one is missed: run it before a
|
|
498
|
+
release. `engine.mjs` measures the data channels, the sending of RTP and the setup of connections, each end in a process
|
|
499
|
+
of its own, `forward.mjs` what the media server forwards, `turn.mjs` what the TURN server relays (with `--idle`
|
|
500
|
+
allocations of other clients, `--workers` threads, `--parallel` connections at once), and `threads.mjs` what pairs of
|
|
501
|
+
connections in one process carry, their engines in the main thread or in worker threads (`--pairs`, `--threads`,
|
|
502
|
+
`--size`).
|
|
503
|
+
`floor.mjs` measures the least a packet costs in JavaScript (encrypting it and sending it over UDP), and
|
|
504
|
+
`send-modes.mjs` the cost of each way of sending a UDP packet; neither needs a build.
|
|
505
|
+
|
|
506
|
+
## See also
|
|
507
|
+
|
|
508
|
+
- The guide on the website: [WebRTC](https://lakutata.com/guide/WebRTC).
|
|
509
|
+
- `doc/en/WebRTC.md` in the `lakutata` package (Chinese in `doc/zh`): the WebRTC guide.
|
|
510
|
+
- `@lakutata/entrypoint`: the Socket.IO and JSON-RPC adapters serving the signaling.
|