werift 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +182 -8
- package/THIRD_PARTY_LICENSES_LIBWEBRTC.txt +58 -0
- package/lib/common/src/binary.d.ts +1 -3
- package/lib/common/src/binary.js +8 -6
- package/lib/common/src/binary.js.map +1 -1
- package/lib/common/src/binaryData.js +2 -1
- package/lib/common/src/binaryData.js.map +1 -1
- package/lib/common/src/event.d.ts +26 -0
- package/lib/common/src/event.js +87 -2
- package/lib/common/src/event.js.map +1 -1
- package/lib/common/src/log.js +5 -7
- package/lib/common/src/log.js.map +1 -1
- package/lib/common/src/network.d.ts +6 -1
- package/lib/common/src/network.js +8 -2
- package/lib/common/src/network.js.map +1 -1
- package/lib/common/src/transport.d.ts +12 -5
- package/lib/common/src/transport.js +13 -7
- package/lib/common/src/transport.js.map +1 -1
- package/lib/dtls/src/alert.d.ts +49 -0
- package/lib/dtls/src/alert.js +103 -0
- package/lib/dtls/src/alert.js.map +1 -0
- package/lib/dtls/src/client.js +15 -1
- package/lib/dtls/src/client.js.map +1 -1
- package/lib/dtls/src/context/cipher.d.ts +1 -1
- package/lib/dtls/src/context/cipher.js +6 -3
- package/lib/dtls/src/context/cipher.js.map +1 -1
- package/lib/dtls/src/context/dtls.d.ts +2 -0
- package/lib/dtls/src/context/dtls.js +11 -2
- package/lib/dtls/src/context/dtls.js.map +1 -1
- package/lib/dtls/src/context/transport.d.ts +17 -1
- package/lib/dtls/src/context/transport.js +40 -3
- package/lib/dtls/src/context/transport.js.map +1 -1
- package/lib/dtls/src/flight/client/flight1.js +2 -1
- package/lib/dtls/src/flight/client/flight1.js.map +1 -1
- package/lib/dtls/src/flight/client/flight5.js +8 -3
- package/lib/dtls/src/flight/client/flight5.js.map +1 -1
- package/lib/dtls/src/flight/flight.d.ts +6 -1
- package/lib/dtls/src/flight/flight.js +18 -5
- package/lib/dtls/src/flight/flight.js.map +1 -1
- package/lib/dtls/src/flight/server/flight4.js +4 -2
- package/lib/dtls/src/flight/server/flight4.js.map +1 -1
- package/lib/dtls/src/flight/server/flight6.js +6 -2
- package/lib/dtls/src/flight/server/flight6.js.map +1 -1
- package/lib/dtls/src/handshake/const.d.ts +17 -13
- package/lib/dtls/src/handshake/const.js +16 -14
- package/lib/dtls/src/handshake/const.js.map +1 -1
- package/lib/dtls/src/handshake/message/alert.js +4 -2
- package/lib/dtls/src/handshake/message/alert.js.map +1 -1
- package/lib/dtls/src/handshake/message/certificate.js +2 -1
- package/lib/dtls/src/handshake/message/certificate.js.map +1 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js +2 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.js +4 -2
- package/lib/dtls/src/handshake/message/client/certificateVerify.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/hello.js +14 -7
- package/lib/dtls/src/handshake/message/client/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js +2 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/message/finished.js +2 -1
- package/lib/dtls/src/handshake/message/finished.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.js +6 -3
- package/lib/dtls/src/handshake/message/server/certificateRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/hello.js +12 -6
- package/lib/dtls/src/handshake/message/server/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloDone.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js +4 -2
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/keyExchange.js +16 -8
- package/lib/dtls/src/handshake/message/server/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/random.d.ts +2 -2
- package/lib/dtls/src/handshake/random.js +5 -2
- package/lib/dtls/src/handshake/random.js.map +1 -1
- package/lib/dtls/src/index.d.ts +3 -1
- package/lib/dtls/src/index.js +10 -1
- package/lib/dtls/src/index.js.map +1 -1
- package/lib/dtls/src/record/const.d.ts +52 -33
- package/lib/dtls/src/record/const.js +51 -36
- package/lib/dtls/src/record/const.js.map +1 -1
- package/lib/dtls/src/record/message/fragment.js +12 -6
- package/lib/dtls/src/record/message/fragment.js.map +1 -1
- package/lib/dtls/src/record/message/header.js +10 -5
- package/lib/dtls/src/record/message/header.js.map +1 -1
- package/lib/dtls/src/record/message/plaintext.js +4 -2
- package/lib/dtls/src/record/message/plaintext.js.map +1 -1
- package/lib/dtls/src/record/receive.d.ts +6 -0
- package/lib/dtls/src/record/receive.js +50 -19
- package/lib/dtls/src/record/receive.js.map +1 -1
- package/lib/dtls/src/server.js +19 -1
- package/lib/dtls/src/server.js.map +1 -1
- package/lib/dtls/src/socket.d.ts +134 -2
- package/lib/dtls/src/socket.js +326 -8
- package/lib/dtls/src/socket.js.map +1 -1
- package/lib/ice/src/candidate.d.ts +1 -1
- package/lib/ice/src/candidate.js +24 -12
- package/lib/ice/src/candidate.js.map +1 -1
- package/lib/ice/src/candidateError.d.ts +155 -0
- package/lib/ice/src/candidateError.js +246 -0
- package/lib/ice/src/candidateError.js.map +1 -0
- package/lib/ice/src/candidateGatherer.d.ts +127 -0
- package/lib/ice/src/candidateGatherer.js +745 -0
- package/lib/ice/src/candidateGatherer.js.map +1 -0
- package/lib/ice/src/consent.d.ts +49 -0
- package/lib/ice/src/consent.js +258 -0
- package/lib/ice/src/consent.js.map +1 -0
- package/lib/ice/src/dns/lookup.d.ts +10 -1
- package/lib/ice/src/dns/lookup.js +42 -7
- package/lib/ice/src/dns/lookup.js.map +1 -1
- package/lib/ice/src/exceptions.d.ts +21 -5
- package/lib/ice/src/exceptions.js +58 -13
- package/lib/ice/src/exceptions.js.map +1 -1
- package/lib/ice/src/ice.d.ts +254 -58
- package/lib/ice/src/ice.js +979 -945
- package/lib/ice/src/ice.js.map +1 -1
- package/lib/ice/src/iceBase.d.ts +328 -14
- package/lib/ice/src/iceBase.js +254 -38
- package/lib/ice/src/iceBase.js.map +1 -1
- package/lib/ice/src/index.d.ts +1 -0
- package/lib/ice/src/index.js +1 -0
- package/lib/ice/src/index.js.map +1 -1
- package/lib/ice/src/internal/checkMessages.d.ts +41 -0
- package/lib/ice/src/internal/checkMessages.js +63 -0
- package/lib/ice/src/internal/checkMessages.js.map +1 -0
- package/lib/ice/src/internal/defaultRoute.d.ts +20 -0
- package/lib/ice/src/internal/defaultRoute.js +134 -0
- package/lib/ice/src/internal/defaultRoute.js.map +1 -0
- package/lib/ice/src/internal/hostInterfaces.d.ts +17 -0
- package/lib/ice/src/internal/hostInterfaces.js +77 -0
- package/lib/ice/src/internal/hostInterfaces.js.map +1 -0
- package/lib/ice/src/internal/hostPreference.d.ts +24 -0
- package/lib/ice/src/internal/hostPreference.js +38 -0
- package/lib/ice/src/internal/hostPreference.js.map +1 -0
- package/lib/ice/src/internal/resolveHostAddresses.d.ts +56 -8
- package/lib/ice/src/internal/resolveHostAddresses.js +127 -24
- package/lib/ice/src/internal/resolveHostAddresses.js.map +1 -1
- package/lib/ice/src/internal/selectAddresses.d.ts +27 -0
- package/lib/ice/src/internal/selectAddresses.js +37 -18
- package/lib/ice/src/internal/selectAddresses.js.map +1 -1
- package/lib/ice/src/nomination/regularNomination.d.ts +200 -0
- package/lib/ice/src/nomination/regularNomination.js +311 -0
- package/lib/ice/src/nomination/regularNomination.js.map +1 -0
- package/lib/ice/src/nomination/selectionReplacement.d.ts +138 -0
- package/lib/ice/src/nomination/selectionReplacement.js +371 -0
- package/lib/ice/src/nomination/selectionReplacement.js.map +1 -0
- package/lib/ice/src/provisional.d.ts +139 -0
- package/lib/ice/src/provisional.js +468 -0
- package/lib/ice/src/provisional.js.map +1 -0
- package/lib/ice/src/stun/protocol.d.ts +9 -2
- package/lib/ice/src/stun/protocol.js +16 -17
- package/lib/ice/src/stun/protocol.js.map +1 -1
- package/lib/ice/src/stun/tcpProtocol.d.ts +1 -1
- package/lib/ice/src/stun/tcpProtocol.js +7 -7
- package/lib/ice/src/stun/tcpProtocol.js.map +1 -1
- package/lib/ice/src/stun/transaction.d.ts +30 -1
- package/lib/ice/src/stun/transaction.js +90 -19
- package/lib/ice/src/stun/transaction.js.map +1 -1
- package/lib/ice/src/turn/credential.d.ts +49 -0
- package/lib/ice/src/turn/credential.js +78 -0
- package/lib/ice/src/turn/credential.js.map +1 -0
- package/lib/ice/src/turn/protocol.d.ts +31 -10
- package/lib/ice/src/turn/protocol.js +127 -51
- package/lib/ice/src/turn/protocol.js.map +1 -1
- package/lib/ice/src/types/model.d.ts +16 -5
- package/lib/ice/src/types/model.js.map +1 -1
- package/lib/ice-server/src/stun/attributes.d.ts +2 -0
- package/lib/ice-server/src/stun/attributes.js +11 -1
- package/lib/ice-server/src/stun/attributes.js.map +1 -1
- package/lib/ice-server/src/stun/const.d.ts +44 -17
- package/lib/ice-server/src/stun/const.js +31 -19
- package/lib/ice-server/src/stun/const.js.map +1 -1
- package/lib/ice-server/src/stun/message.d.ts +29 -4
- package/lib/ice-server/src/stun/message.js +115 -24
- package/lib/ice-server/src/stun/message.js.map +1 -1
- package/lib/index.mjs +35121 -22337
- package/lib/nonstandard/index.mjs +3169 -1399
- package/lib/polyfill/dom.mjs +24650 -12365
- package/lib/polyfill/index.mjs +24650 -12365
- package/lib/rtp/src/codec/assertPayload.d.ts +4 -0
- package/lib/rtp/src/codec/assertPayload.js +12 -0
- package/lib/rtp/src/codec/assertPayload.js.map +1 -0
- package/lib/rtp/src/codec/av1.js +2 -0
- package/lib/rtp/src/codec/av1.js.map +1 -1
- package/lib/rtp/src/codec/h264.js +35 -43
- package/lib/rtp/src/codec/h264.js.map +1 -1
- package/lib/rtp/src/codec/vp8.js +11 -5
- package/lib/rtp/src/codec/vp8.js.map +1 -1
- package/lib/rtp/src/codec/vp9.js +12 -0
- package/lib/rtp/src/codec/vp9.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/container.js +2 -1
- package/lib/rtp/src/extra/container/mp4/container.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/exp-golomb.js +2 -1
- package/lib/rtp/src/extra/container/mp4/exp-golomb.js.map +1 -1
- package/lib/rtp/src/extra/container/mp4/h264.d.ts +21 -17
- package/lib/rtp/src/extra/container/mp4/h264.js +26 -24
- package/lib/rtp/src/extra/container/mp4/h264.js.map +1 -1
- package/lib/rtp/src/extra/container/ogg/index.d.ts +1 -0
- package/lib/rtp/src/extra/container/ogg/index.js +1 -0
- package/lib/rtp/src/extra/container/ogg/index.js.map +1 -1
- package/lib/rtp/src/extra/container/ogg/writer.d.ts +90 -0
- package/lib/rtp/src/extra/container/ogg/writer.js +300 -0
- package/lib/rtp/src/extra/container/ogg/writer.js.map +1 -0
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js +6 -3
- package/lib/rtp/src/extra/container/webm/ebml/ebml.js.map +1 -1
- package/lib/rtp/src/extra/processor/depacketizer.d.ts +5 -0
- package/lib/rtp/src/extra/processor/depacketizer.js +28 -2
- package/lib/rtp/src/extra/processor/depacketizer.js.map +1 -1
- package/lib/rtp/src/extra/processor/dtx.js +4 -2
- package/lib/rtp/src/extra/processor/dtx.js.map +1 -1
- package/lib/rtp/src/extra/processor/index.d.ts +2 -0
- package/lib/rtp/src/extra/processor/index.js +2 -0
- package/lib/rtp/src/extra/processor/index.js.map +1 -1
- package/lib/rtp/src/extra/processor/jitterBuffer.d.ts +29 -6
- package/lib/rtp/src/extra/processor/jitterBuffer.js +101 -111
- package/lib/rtp/src/extra/processor/jitterBuffer.js.map +1 -1
- package/lib/rtp/src/extra/processor/jitterBufferTransformer.js +2 -1
- package/lib/rtp/src/extra/processor/jitterBufferTransformer.js.map +1 -1
- package/lib/rtp/src/extra/processor/lipsync.d.ts +63 -0
- package/lib/rtp/src/extra/processor/lipsync.js +202 -51
- package/lib/rtp/src/extra/processor/lipsync.js.map +1 -1
- package/lib/rtp/src/extra/processor/mp4.d.ts +0 -6
- package/lib/rtp/src/extra/processor/mp4.js +6 -3
- package/lib/rtp/src/extra/processor/mp4.js.map +1 -1
- package/lib/rtp/src/extra/processor/mute.js +4 -2
- package/lib/rtp/src/extra/processor/mute.js.map +1 -1
- package/lib/rtp/src/extra/processor/nack.js +4 -2
- package/lib/rtp/src/extra/processor/nack.js.map +1 -1
- package/lib/rtp/src/extra/processor/ntpTime.js +4 -6
- package/lib/rtp/src/extra/processor/ntpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/ogg.d.ts +72 -0
- package/lib/rtp/src/extra/processor/ogg.js +221 -0
- package/lib/rtp/src/extra/processor/ogg.js.map +1 -0
- package/lib/rtp/src/extra/processor/oggCallback.d.ts +21 -0
- package/lib/rtp/src/extra/processor/oggCallback.js +97 -0
- package/lib/rtp/src/extra/processor/oggCallback.js.map +1 -0
- package/lib/rtp/src/extra/processor/rtpCallback.js +2 -1
- package/lib/rtp/src/extra/processor/rtpCallback.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpStream.js +2 -1
- package/lib/rtp/src/extra/processor/rtpStream.js.map +1 -1
- package/lib/rtp/src/extra/processor/rtpTime.js +2 -1
- package/lib/rtp/src/extra/processor/rtpTime.js.map +1 -1
- package/lib/rtp/src/extra/processor/webm.js +14 -7
- package/lib/rtp/src/extra/processor/webm.js.map +1 -1
- package/lib/rtp/src/extra/processor/webmCallback.js.map +1 -1
- package/lib/rtp/src/index.d.ts +8 -0
- package/lib/rtp/src/index.js +8 -0
- package/lib/rtp/src/index.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.d.ts +4 -0
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js +4 -0
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js.map +1 -1
- package/lib/rtp/src/rtcp/rtcp.js +8 -4
- package/lib/rtp/src/rtcp/rtcp.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.d.ts +58 -0
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.js +143 -0
- package/lib/rtp/src/rtcp/rtpfb/transportWideSequence.js.map +1 -0
- package/lib/rtp/src/rtcp/rtpfb/twcc.d.ts +35 -13
- package/lib/rtp/src/rtcp/rtpfb/twcc.js +132 -54
- package/lib/rtp/src/rtcp/rtpfb/twcc.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.d.ts +13 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.js +29 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReceiveTiming.js.map +1 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.d.ts +41 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.js +89 -0
- package/lib/rtp/src/rtcp/rtpfb/twccReferenceTime.js.map +1 -0
- package/lib/rtp/src/rtcp/sr.js +1 -0
- package/lib/rtp/src/rtcp/sr.js.map +1 -1
- package/lib/rtp/src/rtp/continuity.d.ts +49 -0
- package/lib/rtp/src/rtp/continuity.js +120 -0
- package/lib/rtp/src/rtp/continuity.js.map +1 -0
- package/lib/rtp/src/rtp/headerExtension.js +41 -21
- package/lib/rtp/src/rtp/headerExtension.js.map +1 -1
- package/lib/rtp/src/rtp/padding.d.ts +17 -0
- package/lib/rtp/src/rtp/padding.js +37 -0
- package/lib/rtp/src/rtp/padding.js.map +1 -0
- package/lib/rtp/src/rtp/red/encoder.d.ts +10 -0
- package/lib/rtp/src/rtp/red/encoder.js +14 -1
- package/lib/rtp/src/rtp/red/encoder.js.map +1 -1
- package/lib/rtp/src/rtp/red/packet.js +24 -8
- package/lib/rtp/src/rtp/red/packet.js.map +1 -1
- package/lib/rtp/src/rtp/rtp.d.ts +24 -1
- package/lib/rtp/src/rtp/rtp.js +70 -29
- package/lib/rtp/src/rtp/rtp.js.map +1 -1
- package/lib/rtp/src/rtp/rtx.js +3 -0
- package/lib/rtp/src/rtp/rtx.js.map +1 -1
- package/lib/rtp/src/rtp/sendHeaderExtensions.d.ts +36 -0
- package/lib/rtp/src/rtp/sendHeaderExtensions.js +85 -0
- package/lib/rtp/src/rtp/sendHeaderExtensions.js.map +1 -0
- package/lib/rtp/src/rtp/timelineRewriter.d.ts +178 -0
- package/lib/rtp/src/rtp/timelineRewriter.js +417 -0
- package/lib/rtp/src/rtp/timelineRewriter.js.map +1 -0
- package/lib/rtp/src/srtp/cipher/ctr.js +4 -2
- package/lib/rtp/src/srtp/cipher/ctr.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/index.js +8 -4
- package/lib/rtp/src/srtp/cipher/index.js.map +1 -1
- package/lib/rtp/src/srtp/context/context.js +6 -3
- package/lib/rtp/src/srtp/context/context.js.map +1 -1
- package/lib/rtp/src/srtp/context/srtcp.d.ts +1 -1
- package/lib/rtp/src/srtp/context/srtcp.js +33 -0
- package/lib/rtp/src/srtp/context/srtcp.js.map +1 -1
- package/lib/rtp/src/srtp/context/srtp.d.ts +1 -1
- package/lib/rtp/src/srtp/context/srtp.js +34 -10
- package/lib/rtp/src/srtp/context/srtp.js.map +1 -1
- package/lib/rtp/src/srtp/error.d.ts +8 -0
- package/lib/rtp/src/srtp/error.js +13 -1
- package/lib/rtp/src/srtp/error.js.map +1 -1
- package/lib/rtp/src/srtp/packet.js +4 -1
- package/lib/rtp/src/srtp/packet.js.map +1 -1
- package/lib/rtp/src/srtp/replay.d.ts +24 -0
- package/lib/rtp/src/srtp/replay.js +75 -0
- package/lib/rtp/src/srtp/replay.js.map +1 -0
- package/lib/rtp/src/srtp/session.js +2 -1
- package/lib/rtp/src/srtp/session.js.map +1 -1
- package/lib/rtp/src/srtp/srtcp.js +2 -1
- package/lib/rtp/src/srtp/srtcp.js.map +1 -1
- package/lib/rtp/src/srtp/srtp.js +2 -1
- package/lib/rtp/src/srtp/srtp.js.map +1 -1
- package/lib/rtp/src/util.js +2 -1
- package/lib/rtp/src/util.js.map +1 -1
- package/lib/sctp/src/chunk.d.ts +5 -0
- package/lib/sctp/src/chunk.js +31 -8
- package/lib/sctp/src/chunk.js.map +1 -1
- package/lib/sctp/src/const.d.ts +25 -17
- package/lib/sctp/src/const.js +23 -19
- package/lib/sctp/src/const.js.map +1 -1
- package/lib/sctp/src/param.d.ts +6 -2
- package/lib/sctp/src/param.js +22 -8
- package/lib/sctp/src/param.js.map +1 -1
- package/lib/sctp/src/sctp.d.ts +85 -0
- package/lib/sctp/src/sctp.js +707 -126
- package/lib/sctp/src/sctp.js.map +1 -1
- package/lib/sctp/src/transport.js +4 -2
- package/lib/sctp/src/transport.js.map +1 -1
- package/lib/webrtc/src/api/compatibilityOptions.d.ts +33 -0
- package/lib/webrtc/src/api/compatibilityOptions.js +33 -0
- package/lib/webrtc/src/api/compatibilityOptions.js.map +1 -0
- package/lib/webrtc/src/api/peerConfig.d.ts +385 -28
- package/lib/webrtc/src/api/peerConfig.js +121 -14
- package/lib/webrtc/src/api/peerConfig.js.map +1 -1
- package/lib/webrtc/src/api/peerConnectionEvents.d.ts +77 -1
- package/lib/webrtc/src/api/peerConnectionEvents.js +105 -1
- package/lib/webrtc/src/api/peerConnectionEvents.js.map +1 -1
- package/lib/webrtc/src/dataChannel.d.ts +10 -0
- package/lib/webrtc/src/dataChannel.js +24 -4
- package/lib/webrtc/src/dataChannel.js.map +1 -1
- package/lib/webrtc/src/helper.d.ts +8 -0
- package/lib/webrtc/src/helper.js +40 -4
- package/lib/webrtc/src/helper.js.map +1 -1
- package/lib/webrtc/src/media/codecCompatibility.d.ts +87 -1
- package/lib/webrtc/src/media/codecCompatibility.js +338 -12
- package/lib/webrtc/src/media/codecCompatibility.js.map +1 -1
- package/lib/webrtc/src/media/index.d.ts +10 -0
- package/lib/webrtc/src/media/index.js +70 -0
- package/lib/webrtc/src/media/index.js.map +1 -1
- package/lib/webrtc/src/media/receiver/nack.d.ts +43 -10
- package/lib/webrtc/src/media/receiver/nack.js +246 -88
- package/lib/webrtc/src/media/receiver/nack.js.map +1 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.d.ts +61 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.js +218 -63
- package/lib/webrtc/src/media/receiver/receiverTwcc.js.map +1 -1
- package/lib/webrtc/src/media/router.d.ts +241 -40
- package/lib/webrtc/src/media/router.js +676 -205
- package/lib/webrtc/src/media/router.js.map +1 -1
- package/lib/webrtc/src/media/routing/pendingRoutes.d.ts +26 -0
- package/lib/webrtc/src/media/routing/pendingRoutes.js +48 -0
- package/lib/webrtc/src/media/routing/pendingRoutes.js.map +1 -0
- package/lib/webrtc/src/media/routing/ridRouting.d.ts +37 -0
- package/lib/webrtc/src/media/routing/ridRouting.js +74 -0
- package/lib/webrtc/src/media/routing/ridRouting.js.map +1 -0
- package/lib/webrtc/src/media/routing/routeTable.d.ts +60 -0
- package/lib/webrtc/src/media/routing/routeTable.js +95 -0
- package/lib/webrtc/src/media/routing/routeTable.js.map +1 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.d.ts +34 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.js +165 -0
- package/lib/webrtc/src/media/routing/rtcpRouting.js.map +1 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.d.ts +55 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.js +117 -0
- package/lib/webrtc/src/media/routing/unknownSsrc.js.map +1 -0
- package/lib/webrtc/src/media/rtpReceiver.d.ts +252 -2
- package/lib/webrtc/src/media/rtpReceiver.js +833 -44
- package/lib/webrtc/src/media/rtpReceiver.js.map +1 -1
- package/lib/webrtc/src/media/rtpSender.d.ts +191 -70
- package/lib/webrtc/src/media/rtpSender.js +631 -448
- package/lib/webrtc/src/media/rtpSender.js.map +1 -1
- package/lib/webrtc/src/media/rtpTransceiver.d.ts +19 -3
- package/lib/webrtc/src/media/rtpTransceiver.js +74 -9
- package/lib/webrtc/src/media/rtpTransceiver.js.map +1 -1
- package/lib/webrtc/src/media/sender/bandwidthEstimator.d.ts +249 -0
- package/lib/webrtc/src/media/sender/bandwidthEstimator.js +144 -0
- package/lib/webrtc/src/media/sender/bandwidthEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.d.ts +20 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.js +26 -0
- package/lib/webrtc/src/media/sender/createBandwidthEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.d.ts +70 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.js +175 -0
- package/lib/webrtc/src/media/sender/estimatorBinding.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.d.ts +18 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.js +44 -0
- package/lib/webrtc/src/media/sender/estimators/disabledBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.d.ts +79 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.js +289 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/acknowledgedBitrateEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.d.ts +87 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.js +429 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/aimdRateControl.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.d.ts +21 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.js +84 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/alrDetector.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.d.ts +37 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.js +74 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/bandwidthLimitedCause.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.d.ts +383 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.js +408 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/constants.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.d.ts +406 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.js +1391 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/gccBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.d.ts +19 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.js +75 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/index.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.d.ts +68 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.js +201 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/interArrivalDelta.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.d.ts +26 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.js +72 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/intervalBudget.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.d.ts +41 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.js +99 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/linkCapacityEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.d.ts +247 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.js +1042 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/lossBasedBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.d.ts +26 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.js +132 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/overuseDetector.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.d.ts +305 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.js +1073 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/probeController.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.d.ts +60 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.js +151 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/rttBasedBackoff.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.d.ts +44 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.js +246 -0
- package/lib/webrtc/src/media/sender/estimators/gcc/trendlineEstimator.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/index.d.ts +7 -0
- package/lib/webrtc/src/media/sender/estimators/index.js +19 -0
- package/lib/webrtc/src/media/sender/estimators/index.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.d.ts +64 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.js +216 -0
- package/lib/webrtc/src/media/sender/estimators/lightweightBwe.js.map +1 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.d.ts +117 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.js +250 -0
- package/lib/webrtc/src/media/sender/estimators/twccFeedbackAdapter.js.map +1 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.d.ts +40 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.js +153 -0
- package/lib/webrtc/src/media/sender/outgoingQueue.js.map +1 -0
- package/lib/webrtc/src/media/sender/padding.d.ts +45 -0
- package/lib/webrtc/src/media/sender/padding.js +134 -0
- package/lib/webrtc/src/media/sender/padding.js.map +1 -0
- package/lib/webrtc/src/media/sender/pendingRtp.d.ts +35 -0
- package/lib/webrtc/src/media/sender/pendingRtp.js +120 -0
- package/lib/webrtc/src/media/sender/pendingRtp.js.map +1 -0
- package/lib/webrtc/src/media/sender/rtpWire.d.ts +13 -0
- package/lib/webrtc/src/media/sender/rtpWire.js +38 -0
- package/lib/webrtc/src/media/sender/rtpWire.js.map +1 -0
- package/lib/webrtc/src/media/sender/sendPacer.d.ts +27 -0
- package/lib/webrtc/src/media/sender/sendPacer.js +110 -0
- package/lib/webrtc/src/media/sender/sendPacer.js.map +1 -0
- package/lib/webrtc/src/media/sender/senderBWE.d.ts +8 -33
- package/lib/webrtc/src/media/sender/senderBWE.js +5 -154
- package/lib/webrtc/src/media/sender/senderBWE.js.map +1 -1
- package/lib/webrtc/src/media/sender/senderReportHistory.d.ts +51 -0
- package/lib/webrtc/src/media/sender/senderReportHistory.js +111 -0
- package/lib/webrtc/src/media/sender/senderReportHistory.js.map +1 -0
- package/lib/webrtc/src/media/sender/senderStats.d.ts +101 -0
- package/lib/webrtc/src/media/sender/senderStats.js +317 -0
- package/lib/webrtc/src/media/sender/senderStats.js.map +1 -0
- package/lib/webrtc/src/media/track.d.ts +29 -2
- package/lib/webrtc/src/media/track.js +32 -5
- package/lib/webrtc/src/media/track.js.map +1 -1
- package/lib/webrtc/src/negotiation/bundleTopology.d.ts +1 -5
- package/lib/webrtc/src/negotiation/bundleTopology.js +15 -11
- package/lib/webrtc/src/negotiation/bundleTopology.js.map +1 -1
- package/lib/webrtc/src/negotiation/descriptionValidation.js +12 -6
- package/lib/webrtc/src/negotiation/descriptionValidation.js.map +1 -1
- package/lib/webrtc/src/negotiation/negotiationNeeded.js +2 -1
- package/lib/webrtc/src/negotiation/negotiationNeeded.js.map +1 -1
- package/lib/webrtc/src/negotiation/remoteCandidates.js +10 -5
- package/lib/webrtc/src/negotiation/remoteCandidates.js.map +1 -1
- package/lib/webrtc/src/negotiation/remoteMediaApplication.d.ts +24 -7
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js +67 -27
- package/lib/webrtc/src/negotiation/remoteMediaApplication.js.map +1 -1
- package/lib/webrtc/src/negotiation/transceiverPairing.d.ts +1 -0
- package/lib/webrtc/src/negotiation/transceiverPairing.js +62 -0
- package/lib/webrtc/src/negotiation/transceiverPairing.js.map +1 -0
- package/lib/webrtc/src/negotiation/transportActivation.d.ts +8 -1
- package/lib/webrtc/src/negotiation/transportActivation.js +40 -8
- package/lib/webrtc/src/negotiation/transportActivation.js.map +1 -1
- package/lib/webrtc/src/negotiationTransaction.d.ts +43 -5
- package/lib/webrtc/src/negotiationTransaction.js +129 -13
- package/lib/webrtc/src/negotiationTransaction.js.map +1 -1
- package/lib/webrtc/src/nonstandard/dummyMedia.js +2 -1
- package/lib/webrtc/src/nonstandard/dummyMedia.js.map +1 -1
- package/lib/webrtc/src/nonstandard/navigator.js +4 -3
- package/lib/webrtc/src/nonstandard/navigator.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/index.d.ts +32 -8
- package/lib/webrtc/src/nonstandard/recorder/index.js +81 -20
- package/lib/webrtc/src/nonstandard/recorder/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.d.ts +9 -7
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js +2 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.d.ts +32 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.js +185 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/ogg.js.map +1 -0
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js +8 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia.js +2 -1
- package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
- package/lib/webrtc/src/peerConnection.d.ts +108 -6
- package/lib/webrtc/src/peerConnection.js +357 -36
- package/lib/webrtc/src/peerConnection.js.map +1 -1
- package/lib/webrtc/src/polyfill/globals.d.ts +2 -1
- package/lib/webrtc/src/polyfill/globals.js.map +1 -1
- package/lib/webrtc/src/polyfill/install.js +2 -0
- package/lib/webrtc/src/polyfill/install.js.map +1 -1
- package/lib/webrtc/src/polyfill/mediaDevices.js +2 -1
- package/lib/webrtc/src/polyfill/mediaDevices.js.map +1 -1
- package/lib/webrtc/src/sctpManager.d.ts +46 -14
- package/lib/webrtc/src/sctpManager.js +92 -25
- package/lib/webrtc/src/sctpManager.js.map +1 -1
- package/lib/webrtc/src/sdp.d.ts +69 -0
- package/lib/webrtc/src/sdp.js +151 -20
- package/lib/webrtc/src/sdp.js.map +1 -1
- package/lib/webrtc/src/sdpManager.d.ts +85 -4
- package/lib/webrtc/src/sdpManager.js +214 -14
- package/lib/webrtc/src/sdpManager.js.map +1 -1
- package/lib/webrtc/src/secureTransportManager.d.ts +89 -4
- package/lib/webrtc/src/secureTransportManager.js +184 -26
- package/lib/webrtc/src/secureTransportManager.js.map +1 -1
- package/lib/webrtc/src/transceiverManager.d.ts +82 -4
- package/lib/webrtc/src/transceiverManager.js +239 -41
- package/lib/webrtc/src/transceiverManager.js.map +1 -1
- package/lib/webrtc/src/transport/dtls.d.ts +147 -1
- package/lib/webrtc/src/transport/dtls.js +446 -50
- package/lib/webrtc/src/transport/dtls.js.map +1 -1
- package/lib/webrtc/src/transport/ice.d.ts +71 -90
- package/lib/webrtc/src/transport/ice.js +250 -42
- package/lib/webrtc/src/transport/ice.js.map +1 -1
- package/lib/webrtc/src/transport/sctp.d.ts +25 -0
- package/lib/webrtc/src/transport/sctp.js +153 -22
- package/lib/webrtc/src/transport/sctp.js.map +1 -1
- package/lib/webrtc/src/utils.d.ts +69 -3
- package/lib/webrtc/src/utils.js +105 -16
- package/lib/webrtc/src/utils.js.map +1 -1
- package/package.json +9 -6
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Portions of this file are ported from libwebrtc
|
|
3
|
+
* (https://webrtc.googlesource.com/src, commit 0fda16159e33adf59c71a7ad1173dcbe5a632102).
|
|
4
|
+
* Copyright (c) 2011, The WebRTC project authors. All rights reserved.
|
|
5
|
+
* Use of that source is governed by a BSD-style license and an additional
|
|
6
|
+
* patent grant; both are reproduced in THIRD_PARTY_LICENSES_LIBWEBRTC.txt
|
|
7
|
+
* (shipped with this package).
|
|
8
|
+
*/
|
|
9
|
+
import { Event } from "../../../../imports/common";
|
|
10
|
+
import type { TransportWideCC } from "../../../../imports/rtp";
|
|
11
|
+
import type { BandwidthEstimator, BandwidthEstimatorProcessor, NetworkAvailabilityConsumer, ProbePacingController, RoundTripTimeConsumer, SentInfo } from "../../bandwidthEstimator";
|
|
12
|
+
import type { BandwidthUsage } from "./overuseDetector";
|
|
13
|
+
import type { ProbeClusterConfig, ProbeState } from "./probeController";
|
|
14
|
+
/**
|
|
15
|
+
* Optional sender clock for tests. Production uses {@link milliTime} so
|
|
16
|
+
* `sendingAtMs` and TWCC feedback arrival share one domain (pin Timestamp).
|
|
17
|
+
*/
|
|
18
|
+
export type GccClock = () => number;
|
|
19
|
+
/**
|
|
20
|
+
* Optional GCC constructor settings. Probe / RTT / process hooks are on
|
|
21
|
+
* {@link BandwidthEstimator}; this type is constructor-only (clock, ALR).
|
|
22
|
+
*/
|
|
23
|
+
export type GccBandwidthEstimatorOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Sender clock. Tests may inject a synthetic clock so send / feedback stay
|
|
26
|
+
* in one domain. Production omits this (defaults to {@link milliTime}).
|
|
27
|
+
*/
|
|
28
|
+
clock?: GccClock;
|
|
29
|
+
/**
|
|
30
|
+
* pin `requests_alr_probing` / `ProbeController::EnablePeriodicAlrProbing`.
|
|
31
|
+
* Default **false** — GoogCc does not enable periodic ALR probing after the
|
|
32
|
+
* first TWCC; only an explicit config / this option turns it on.
|
|
33
|
+
*/
|
|
34
|
+
periodicAlrProbing?: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Google Congestion Control send-side bandwidth estimator (libwebrtc-aligned).
|
|
38
|
+
*
|
|
39
|
+
* - {@link TrendlineEstimator}: delay gradient + overuse hypothesis
|
|
40
|
+
* - {@link AimdRateControl}: delay-based A_hat
|
|
41
|
+
* - {@link LossBasedBwe}: loss path
|
|
42
|
+
* - {@link ProbeController}: exponential / further probes
|
|
43
|
+
*
|
|
44
|
+
* Bitrate is published only after at least one **known** sent sequence is
|
|
45
|
+
* observed in TWCC (empty / unmatched feedback does not notify).
|
|
46
|
+
*/
|
|
47
|
+
export declare class GccBandwidthEstimator implements BandwidthEstimator, ProbePacingController, RoundTripTimeConsumer, BandwidthEstimatorProcessor, NetworkAvailabilityConsumer {
|
|
48
|
+
readonly processIntervalMs = 25;
|
|
49
|
+
readonly probePaddingPacketBytes = 224;
|
|
50
|
+
readonly probePaddingMaxBurst = 16;
|
|
51
|
+
readonly onAvailableBitrate: Event<[number]>;
|
|
52
|
+
readonly onOveruseDetected: Event<[BandwidthUsage]>;
|
|
53
|
+
readonly onProbeClusterConfig: Event<[ProbeClusterConfig]>;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated No-op compatibility with LightweightBandwidthEstimator.
|
|
56
|
+
* Never fires.
|
|
57
|
+
*/
|
|
58
|
+
readonly onCongestion: Event<[boolean]>;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated No-op compatibility with LightweightBandwidthEstimator.
|
|
61
|
+
* Never fires.
|
|
62
|
+
*/
|
|
63
|
+
readonly onCongestionScore: Event<[number]>;
|
|
64
|
+
/** @deprecated Always false on GCC. */
|
|
65
|
+
congestion: boolean;
|
|
66
|
+
/** @deprecated Always 1 on GCC. */
|
|
67
|
+
readonly congestionScore = 1;
|
|
68
|
+
private readonly trendline;
|
|
69
|
+
private readonly aimd;
|
|
70
|
+
private readonly lossBwe;
|
|
71
|
+
private readonly probe;
|
|
72
|
+
/** pin `AlrDetector` — send vs estimate budget. */
|
|
73
|
+
private readonly alr;
|
|
74
|
+
private previouslyInAlr;
|
|
75
|
+
/** After dispose(), public I/O is a no-op so a leftover padding loop cannot revive state. */
|
|
76
|
+
private disposed;
|
|
77
|
+
private readonly interArrival;
|
|
78
|
+
/** Unwraps 24-bit TWCC reference_time across feedbacks. */
|
|
79
|
+
/**
|
|
80
|
+
* Sender clock. Production: {@link milliTime}. Tests may inject a synthetic
|
|
81
|
+
* clock so send / feedback stay in one domain (no production clock heuristic).
|
|
82
|
+
*/
|
|
83
|
+
private readonly clock;
|
|
84
|
+
/**
|
|
85
|
+
* Send history + feedback normalization (pin TransportFeedbackAdapter
|
|
86
|
+
* `history_`). Received packets leave history, so duplicate / corrective
|
|
87
|
+
* reports are dropped before any subsystem sees them. Not-received packets
|
|
88
|
+
* stay so a later feedback can still report them as received.
|
|
89
|
+
*/
|
|
90
|
+
private readonly feedbackAdapter;
|
|
91
|
+
private lastUsage;
|
|
92
|
+
/**
|
|
93
|
+
* libwebrtc RobustThroughputEstimator (default acked bitrate path).
|
|
94
|
+
* Fed receive-time-ordered ACKs; does not mix sender wall clock.
|
|
95
|
+
*/
|
|
96
|
+
private readonly ackedBitrate;
|
|
97
|
+
private delayBasedBps;
|
|
98
|
+
private lossBasedBps;
|
|
99
|
+
private startBitrateBps;
|
|
100
|
+
/** pin TargetRateConstraints min. */
|
|
101
|
+
private minConfiguredBps;
|
|
102
|
+
/**
|
|
103
|
+
* App-configured max from {@link setBitrates}. Unset → target uses
|
|
104
|
+
* {@link kMaxBitrateBps} (1 Gbps) and probing uses
|
|
105
|
+
* {@link kDefaultMaxProbingBitrateBps} (5 Mbps). After setBitrates both
|
|
106
|
+
* get the same app max (pin ResetConstraints).
|
|
107
|
+
*/
|
|
108
|
+
private appMaxBps;
|
|
109
|
+
/**
|
|
110
|
+
* pin `SendSideBandwidthEstimation::delay_based_limit_`.
|
|
111
|
+
* Starts at +∞ and is written only by a delay-path result
|
|
112
|
+
* (`UpdateDelayBasedEstimate`). A matched TWCC without receive times
|
|
113
|
+
* (all-lost / ReceivedWithoutDelta) must **not** turn the constructor
|
|
114
|
+
* start bitrate into a delay cap (pin `delay_based_limit_`). See pin `delay_based_limit_`.
|
|
115
|
+
*/
|
|
116
|
+
private delayBasedLimitBps;
|
|
117
|
+
private probingConfigured;
|
|
118
|
+
/** Valid TWCC samples seen at least once (gates publishing estimates). */
|
|
119
|
+
private hasValidSample;
|
|
120
|
+
/** Bytes already sent while any probe cluster is active. */
|
|
121
|
+
private probeClusterSentBytes;
|
|
122
|
+
private probeClusterStartMs;
|
|
123
|
+
private lastProbeTargetBps;
|
|
124
|
+
/**
|
|
125
|
+
* libwebrtc RttBasedBackoff — IsRttAboveLimit uses **propagation RTT**
|
|
126
|
+
* (CorrectedRtt), not raw max feedback RTT. max feedback RTT is stored only
|
|
127
|
+
* for diagnostics (congestion-window style uses in pin).
|
|
128
|
+
* When above limit, pin UpdateEstimate applies ×0.8 target drops.
|
|
129
|
+
*/
|
|
130
|
+
private readonly rttBackoff;
|
|
131
|
+
/**
|
|
132
|
+
* pin `SendSideBandwidthEstimation::current_target_` — final target layer
|
|
133
|
+
* that RTT backoff multiplies. Initialized to start bitrate (constraints).
|
|
134
|
+
*/
|
|
135
|
+
private currentTargetBps;
|
|
136
|
+
/**
|
|
137
|
+
* pin `time_last_decrease_` for RTT-based target drops
|
|
138
|
+
* (MinusInfinity so the first drop fires immediately when above limit).
|
|
139
|
+
*/
|
|
140
|
+
private lastRttDecreaseMs;
|
|
141
|
+
/** pin `first_packet_sent_` — seeds UpdatePropagationRtt(send, 0). */
|
|
142
|
+
private firstPacketSent;
|
|
143
|
+
/**
|
|
144
|
+
* pin `last_fraction_loss_` (Q8, 0–255). Updated only via
|
|
145
|
+
* {@link updatePacketsLost} (OnTransportLossReport). TWCC does not
|
|
146
|
+
* write this — LossBasedV2 has its own observation path.
|
|
147
|
+
*/
|
|
148
|
+
private lastFractionLoss;
|
|
149
|
+
/**
|
|
150
|
+
* pin `first_report_time_`. MinusInfinity until the first
|
|
151
|
+
* {@link updatePacketsLost}. `IsInStartPhase` is then true forever
|
|
152
|
+
* until a TransportLossReport arrives (TWCC-only production path).
|
|
153
|
+
*/
|
|
154
|
+
private firstReportTimeMs;
|
|
155
|
+
/** pin accumulators for `UpdatePacketsLost` (`kLimitNumPackets` = 20). */
|
|
156
|
+
private lostPacketsSinceLastLossUpdate;
|
|
157
|
+
private expectedPacketsSinceLastLossUpdate;
|
|
158
|
+
/** Last batch max_feedback_rtt (diagnostics; not used for probe cause). */
|
|
159
|
+
private lastMaxFeedbackRttMs;
|
|
160
|
+
/** Last batch min_propagation_rtt (before timeout correction). */
|
|
161
|
+
private lastPropagationRttMs;
|
|
162
|
+
/**
|
|
163
|
+
* Sender clock of the last TWCC packet feedback that fed the delay path
|
|
164
|
+
* (libwebrtc DelayBasedBwe::last_seen_packet_).
|
|
165
|
+
*/
|
|
166
|
+
private lastSeenPacketMs;
|
|
167
|
+
/**
|
|
168
|
+
* pin `DelayBasedBwe::prev_bitrate_` / `last_estimate()`.
|
|
169
|
+
* Used to drop probes below both last delay estimate and NSE lower.
|
|
170
|
+
*/
|
|
171
|
+
private lastDelayEstimateBps;
|
|
172
|
+
/** pin `NetworkStateEstimate::link_capacity_lower`. 0 = unset. */
|
|
173
|
+
private networkLowerBps;
|
|
174
|
+
/**
|
|
175
|
+
* pin `enable_periodic_alr_probing_` — persisted across {@link reset}
|
|
176
|
+
* (constructor / {@link enablePeriodicAlrProbing}).
|
|
177
|
+
*/
|
|
178
|
+
private periodicAlrProbing;
|
|
179
|
+
/**
|
|
180
|
+
* Token-bucket for pin GetPacingRates padding_rate while
|
|
181
|
+
* `kIncreaseUsingPadding`. Accrued on process / pending query; drained
|
|
182
|
+
* by media and injected padding.
|
|
183
|
+
*/
|
|
184
|
+
private paddingDueBytes;
|
|
185
|
+
private lastPaddingAccrueMs;
|
|
186
|
+
get availableBitrate(): number;
|
|
187
|
+
get usageState(): BandwidthUsage;
|
|
188
|
+
get probeState(): ProbeState;
|
|
189
|
+
get suggestedProbeBitrateBps(): number;
|
|
190
|
+
/**
|
|
191
|
+
* pin CorrectedRtt = timeout_correction + last propagation RTT.
|
|
192
|
+
* Grows while packets are sent without TWCC (feedback stall).
|
|
193
|
+
*/
|
|
194
|
+
get correctedRttMs(): number;
|
|
195
|
+
/** pin `RttBasedBackoff::IsRttAboveLimit` (CorrectedRtt > 3s). */
|
|
196
|
+
get rttAboveLimit(): boolean;
|
|
197
|
+
getPacingBitrateBps(): number;
|
|
198
|
+
/**
|
|
199
|
+
* pin `BitrateProber::CurrentCluster` — must be called **before** send.
|
|
200
|
+
*/
|
|
201
|
+
reserveOutgoingProbe(nowMs: number): import("./probeController").ProbeReservation | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* pin `GetPacingRates` padding_rate when loss state is
|
|
204
|
+
* `kIncreaseUsingPadding`: last loss-based target (current target).
|
|
205
|
+
*/
|
|
206
|
+
getPaddingBitrateBps(): number;
|
|
207
|
+
/**
|
|
208
|
+
* Padding packets to send so the token-bucket approaches
|
|
209
|
+
* {@link getPaddingBitrateBps} when media is sparse. 0 while probing.
|
|
210
|
+
*/
|
|
211
|
+
pendingLossPaddingPackets(packetBytes?: number): number;
|
|
212
|
+
shouldTagProbePacket(): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* How many padding packets the sender should inject to progress the active
|
|
215
|
+
* probe cluster when media is sparse. 0 if not probing or cluster is full.
|
|
216
|
+
*/
|
|
217
|
+
pendingProbePaddingPackets(packetBytes?: number): number;
|
|
218
|
+
/**
|
|
219
|
+
* pin GoogCcNetworkController::OnProcessInterval order:
|
|
220
|
+
* ResetConstraints / SetBitrates (first interval → {@link ensureProbing})
|
|
221
|
+
* → UpdateEstimate
|
|
222
|
+
* → SetAlrStartTime
|
|
223
|
+
* → ProbeController::Process
|
|
224
|
+
* → MaybeTriggerOnNetworkChanged
|
|
225
|
+
*
|
|
226
|
+
* Process still sees the **previous** BandwidthLimitedCause. A tick that
|
|
227
|
+
* first crosses the RTT limit can therefore emit a due ALR probe, and only
|
|
228
|
+
* afterwards publish `kRttBasedBackOffHighRtt`. Does **not** call
|
|
229
|
+
* {@link RttBasedBackoff.onSentPacket}.
|
|
230
|
+
*/
|
|
231
|
+
process(nowMs: number): void;
|
|
232
|
+
/**
|
|
233
|
+
* pin `EnablePeriodicAlrProbing` / later `OnStreamsConfig`.
|
|
234
|
+
* Default remains false until the caller opts in.
|
|
235
|
+
*/
|
|
236
|
+
enablePeriodicAlrProbing(enable: boolean): void;
|
|
237
|
+
/**
|
|
238
|
+
* pin `OnNetworkStateEstimate` / `SetNetworkStateEstimate`.
|
|
239
|
+
* `linkCapacityUpperBps <= 0` clears the estimate on ProbeController and AIMD.
|
|
240
|
+
*/
|
|
241
|
+
setNetworkStateEstimate(linkCapacityUpperBps: number, linkCapacityLowerBps?: number): void;
|
|
242
|
+
/**
|
|
243
|
+
* pin `OnTargetRateConstraints` / `ResetConstraints` / `ClampConstraints`
|
|
244
|
+
* then `ProbeController::SetBitrates`.
|
|
245
|
+
*
|
|
246
|
+
* Constraints are **replaced** (pin `ResetConstraints`), not merged
|
|
247
|
+
* with the previous min/max. `min = 0` floors at {@link kMinBitrateBps};
|
|
248
|
+
* non-finite / non-positive max clears the app cap (target 1 Gbps,
|
|
249
|
+
* probe 5 Mbps). `start = 0` does not overwrite current_target.
|
|
250
|
+
*
|
|
251
|
+
* Normalization (pin order): min floored at {@link kMinBitrateBps} →
|
|
252
|
+
* max raised to min → start raised to min when `start > 0`. The same
|
|
253
|
+
* triple is then applied to AIMD, LossBasedBwe, ProbeController, and
|
|
254
|
+
* {@link applyTargetLimits}.
|
|
255
|
+
*
|
|
256
|
+
* While probing is `complete`, a **higher** max than the previous max
|
|
257
|
+
* (and than the current estimate) starts a single probe at the new max
|
|
258
|
+
* (`probe_further=false`, pin `SetBitrates` / `kProbingComplete`).
|
|
259
|
+
*/
|
|
260
|
+
setBitrates(minBps: number, startBps: number, maxBps: number): void;
|
|
261
|
+
/**
|
|
262
|
+
* pin OnRoundTripTimeUpdate → DelayBasedBwe::OnRttUpdate → AimdRateControl::SetRtt.
|
|
263
|
+
* Callers must pass **raw** (unsmoothed) RTCP RR RTT in milliseconds — pin
|
|
264
|
+
* GoogCc discards smoothed RTT updates. Independent of TWCC propagation RTT
|
|
265
|
+
* used by {@link RttBasedBackoff}.
|
|
266
|
+
*/
|
|
267
|
+
setRoundTripTime(rttMs: number): void;
|
|
268
|
+
/**
|
|
269
|
+
* pin `OnTransportLossReport` → `UpdatePacketsLost`.
|
|
270
|
+
*
|
|
271
|
+
* Feeds `last_fraction_loss_` / `first_report_time_` for the UpdateEstimate
|
|
272
|
+
* **startup** gate. Does not adopt LossBasedV2 (that stays on TWCC).
|
|
273
|
+
* Fraction-loss is published only after
|
|
274
|
+
* {@link kStartPhaseLossReportMinPackets} packets accumulate.
|
|
275
|
+
*
|
|
276
|
+
* Not on the thin {@link BandwidthEstimator} interface — RTCP RR / XR
|
|
277
|
+
* wiring is GCC-specific (same pattern as {@link setRoundTripTime}).
|
|
278
|
+
*/
|
|
279
|
+
updatePacketsLost(packetsLost: number, numberOfPackets: number, atTimeMs?: number): void;
|
|
280
|
+
/**
|
|
281
|
+
* pin `OnNetworkAvailability`. Initial 3x/6x probing starts only after the
|
|
282
|
+
* transport is send-ready (and SetBitrates / first ProcessInterval has
|
|
283
|
+
* stored a start bitrate).
|
|
284
|
+
*/
|
|
285
|
+
setNetworkAvailable(available: boolean): void;
|
|
286
|
+
static readonly knownDifferences: readonly ["LossBasedBweV2: byte-loss objective/derivative (UseByteLossRate), bias adjustment by loss ratio, instant upper/lower bounds, delayed-increase window, current_best_estimate_ vs loss_based_result_ (HOLD publishes min(holdRate, bounded) without rewriting the candidate model), HOLD is kDecreasing + last_hold_info_ timer (no kHold state; arm only when entering decreasing), acked-rate ramp-up cap applied after best-candidate selection (not in GetCandidates) plus 1bps decreasing→increasing nudge, state vs configured max_bitrate_ (not the 1 Gbps default); GetCandidates does not pre-clamp to configured max (Newton/objective see the window upper; final bound uses InstantUpperBound/max); bandwidth_limit_in_current_window_ starts +∞ (IsValid = Number.isFinite); IncreaseUsingPadding + CanKeepIncreasingState (pin PaddingDuration default 2s — stay in increase_using_padding while last_padding+2s >= last_send or padding_rate < estimate); GetCandidates(in_alr) skips acked-rate in ALR (NotUseAckedRateInAlr) unless padding window still open; CalculateAverageReportedByteLossRatio excludes min/max loss-rate observations when n>3 unless max-loss send rate ≥ median×2; PushBackObservation increments num_packets/size on every feedback appearance (lost map is seq-keyed); late lost→received unmarks only the current partial observation (committed observations are not rewritten); Newton/state run only after a committed observation; current_best starts uninitialized and copies delay_based_estimate_ on the first commit; GetLossBasedResult stays kDelayBasedEstimate until IsReady and returns +Infinity (not current-best) when delay is unset; SendSide UpdateEstimate (receiveTWCC / process / UpdatePacketsLost): RTT branch first; then last_fraction_loss==0 && IsInStartPhase (2s after first TransportLossReport; remains open until RR) && !ReadyToUseInStartPhase (IsReady && UseInStartPhase=true) → max(current, delay_based_limit) then return; then adopt LossBased only when IsReady; else ApplyTargetLimits. V1 RTCP-RR 8%/50% loss ramp is not ported (TWCC-only + LossBasedV2)", "No REMB integration; TWCC-only send-side mode (ticket non-goal; future work)", "Media pacing uses a lightweight token bucket at pin GetPacingRates (2.5× before first TWCC, 1.1× after); probe packets use BitrateProber next_probe_time = started_at + sent_bytes/send_bitrate (min_probe_delta 20ms initial / 2ms further; max_probe_delay 10ms discards late active clusters). 5s kProbeClusterTimeout drops queued clusters only. RTP padding injection replaces PacedSender. ProbeBitrateEstimator does not clamp to configured max (target layer does). Probe cluster id is reserved before send (PacedPacketInfo). 3x/6x queued FIFO — pacing advances on send-fill (minBytes AND minPackets), not on ACK; ProbeController result-wait (sender clock 1s) is separate from ProbeBitrateEstimator history (receive timeline 1s + sender-side kSendTimeHistoryWindowMs=60s cap matching pin TransportFeedbackAdapter) so late TWCC after controller complete can still yield estimates within the window; further after 80% still refines pending estimate; SetEstimatedBitrate further only while waiting_for_result (pin); session complete (timeout/empty queue/abort) sets min_bitrate_to_probe_further=+∞ so further cannot re-open after complete; when uncapped further/recovery/initial target ≥ max_bitrate (or cause max_probe), clamp and stop further (probe_further=false, min=+inf); SetBitrates in kProbingComplete starts a single probe at the new max when max increases and estimate < new max (pin); probe_further=false → kProbingComplete (pacing FIFO continues); unset target max is 1 Gbps and probe max is 5 Mbps; setBitrates is pin ResetConstraints — each call replaces min/max (min=0 floors at 5 kbps, non-finite/≤0 max clears the app cap; start=0 leaves current_target); ClampConstraints: min floor 5 kbps, max raised to min, start raised to min when start>0 — same triple to AIMD / LossBased / ProbeController / ApplyTargetLimits; delay_based_limit_ is +∞ until a delay-path result (all-lost TWCC does not install the start bitrate as a delay cap); SetSendBitrate(start>0) clears that limit; ProbeController.reset keeps periodic ALR / network-available / alr_start and sets last_bwe_drop_probing_time_ / time_of_last_large_drop_ to at_time (RequestProbe time_since_probe>5s and time_since_drop<5s); active clusters are never aborted mid-send by TWCC loss/overuse — update order matches pin DelayBasedBwe::MaybeUpdateEstimate: while overusing ignore probe_bitrate entirely (AIMD TimeToReduceFurther only); when not overusing apply probe SetEstimate on delay path **without upward caps** (lower results floored with acked×0.85 only); recovered_from_overuse only when no probe_bitrate this feedback and not overusing; then LossBasedBwe.update(post-probe delay) → GetBandwidthLimitedCause from **post-loss** state; underuse/overuse → forbid; CorrectedRtt (propagation + timeout) > 3s → forbid; loss decreasing/increase_using_padding → forbid; loss increasing → allow with max_probe = estimated × 1.5; delay_based → allow uncapped; recovery via pin RequestProbe (ALR or ALR-ended <3s + large drop <5s → 0.85×bitrate_before_last_large_drop, probe_further=false, 5s min between drop probes) latched on per-packet underuse→normal; AlrDetector + periodic ALR probing (alr_interval=5s, alr_scale=2) is **opt-in** (`periodicAlrProbing` constructor / EnablePeriodicAlrProbing; pin default false — not auto-enabled after first TWCC); network-state estimate path (SetNetworkStateEstimate + Process TimeForNetworkStateProbe; default interval +∞ so idle until configured); default max probe 5 Mbps (pin kDefaultMaxProbingBitrate) when the app does not set a lower cap", "AIMD ported from pin aimd_rate_control: ChangeState/ChangeBitrate, decrease = throughput×β then −5kbps if >5kbps, increase limit 1.5×throughput+10kbps, multiplicative 1.08^Δt (min +1000bps), additive via GetNearMaxIncreaseRate ((rtt+100ms)×2, min 4000bps/s), LinkCapacityEstimator (pin Reset clears estimate only; full resetAll on estimator reset); TimeToReduceFurther clamps RTT to [10,200]ms; default RTT 200ms; AIMD RTT only via RoundTripTimeConsumer.setRoundTripTime with **raw** RTCP RR RTT (pin discards smoothed updates; stats EWMA is separate) — RttBasedBackoff propagation RTT is separate (IsRttAboveLimit + ×0.8 drop then GetUpperLimit=delay/max and min_bitrate 5kbps via BandwidthEstimatorProcessor.process at pin 25ms ProcessInterval / TWCC; rtpPacketSent is pin OnSentPacket only — ALR OnBytesSent, history, first-packet UpdatePropagationRtt(send,0), OnSentPacket, probe send-fill — no UpdateEstimate / ProbeController::Process); receiveTWCC is pin OnTransportPacketsFeedback — ALR-ended first, delay only when SortedByReceiveTime is non-empty, no ProbeController::Process; ensureProbing / SetBitrates only on first ProcessInterval (not rtpPacketSent / shouldTag / padding queries); ProbeController network_available_ starts false — OnNetworkAvailability(true) from DTLS connected (or already-connected setBandwidthEstimator) starts 3x/6x; receiveTWCC MaybeTrigger only when DelayBasedBwe Result.updated (all-lost / no-timing / overuse without TimeToReduceFurther wait for ProcessInterval; probes below last delay estimate and NSE link_capacity_lower are ignored); process() first tick ensureProbing then UpdateEstimate → SetAlrStartTime → ProbeController::Process → MaybeTriggerOnNetworkChanged; high-RTT UpdateEstimate never adopts LossBased result; NetworkStateEstimate upper/lower applied in AIMD ClampBitrate when set; DelayBasedBwe kStreamTimeOut (2s) resets InterArrivalDelta + TrendlineEstimator; send history lives in the shared TwccFeedbackAdapter (pin TransportFeedbackAdapter): keyed by extended transport-wide seq, feedback unwrapped against the previous feedback (seeded by the latest sent seq), received packets leave history so re-reports are ignored, lost packets stay for a later received report; history ages out on process() as well as send (60s window) and is additionally capped to a span below 32768 sequences so a 16-bit feedback number has at most one candidate; probe seq maps key by the same extended seq", "Acknowledged bitrate uses RobustThroughputEstimator defaults (window_packets=20, min_duration=1s, required_packets=10, largest-gap replace); Bayesian BitrateEstimator kept as utility; SetAlr/SetAlrEndedTime are no-ops on the Robust path (pin RobustThroughputEstimator)", "TWCC 24-bit reference_time is unwrapped across feedbacks in TwccFeedbackAdapter (continuous ms timeline); packetResults alone still report raw wrap-relative times; ReceiverTWCC is a dumb receiver without libwebrtc RemoteEstimatorProxy re-send on reordering (a packet arriving after its sequence was reported stays reported as lost)", "Probe / loss padding is padding-only RTP on the negotiated RTX SSRC / payload type (RTX sequence space). Without RTX no padding is sent at all (libwebrtc can fall back to media-SSRC padding): probe clusters are then filled by media only and loss-based increase_using_padding has no padding to send. Media sequence numbers are never shifted by padding", "Floating-point / wall-clock differences may cause sub-bps numerical drift vs C++ (not bit-identical to libwebrtc public test vectors)", "InterArrivalDelta: reordered-reset / arrival−system offset (>=3000ms) ported; production passes feedback_time as system_time", "Transport-wide sequence is a monotonic extended counter on the DTLS transport (wire is 16-bit). ReceiverTWCC and TWCC RTCP fan-out are per DTLS transport; BWE instances remain per RTCRtpSender (each estimator matches only its own SentInfo, keyed by extended TSN). Transport-level GCC/pacer allocation is a non-goal", "OveruseDetector class is unused at runtime (TrendlineEstimator::Detect owns hypothesis); BandwidthUsage type is shared"];
|
|
287
|
+
/**
|
|
288
|
+
* @param startBitrateBps Initial target / AIMD start (bps).
|
|
289
|
+
* @param options.clock Optional sender clock for unit tests. Must match the
|
|
290
|
+
* domain of {@link SentInfo.sendingAtMs} used with this instance.
|
|
291
|
+
* Production omits this (defaults to {@link milliTime}).
|
|
292
|
+
* @param options.periodicAlrProbing pin `requests_alr_probing` (default false).
|
|
293
|
+
*/
|
|
294
|
+
constructor(startBitrateBps?: number, options?: GccBandwidthEstimatorOptions);
|
|
295
|
+
rtpPacketSent(info: SentInfo): void;
|
|
296
|
+
receiveTWCC(feedback: TransportWideCC): void;
|
|
297
|
+
/**
|
|
298
|
+
* pin `OnNetworkRouteChange`: reset everything path-dependent, keep the
|
|
299
|
+
* app constraints from {@link setBitrates} (min, start, max). Probing is
|
|
300
|
+
* reconfigured from them on the next {@link process}.
|
|
301
|
+
*/
|
|
302
|
+
resetNetworkRoute(): void;
|
|
303
|
+
reset(): void;
|
|
304
|
+
/**
|
|
305
|
+
* pin `GetUpperLimit` delay_based_limit_. +∞ until
|
|
306
|
+
* {@link noteDelayBasedEstimate} (not merely `hasValidSample`).
|
|
307
|
+
*/
|
|
308
|
+
private delayBasedUpperLimitBps;
|
|
309
|
+
/**
|
|
310
|
+
* pin `UpdateDelayBasedEstimate`: zero means PlusInfinity (no delay cap).
|
|
311
|
+
*/
|
|
312
|
+
private noteDelayBasedEstimate;
|
|
313
|
+
/** pin loss BWE input: delay_based_limit_, or 0 while it is +∞. */
|
|
314
|
+
private delayLimitForLossBwe;
|
|
315
|
+
/**
|
|
316
|
+
* pin `UpdateEstimate` when `LossBasedBandwidthEstimatorV2ReadyForUse`.
|
|
317
|
+
* Reads {@link LossBasedBwe.getLossBasedResult} and applies target limits.
|
|
318
|
+
*/
|
|
319
|
+
private adoptLossBasedResult;
|
|
320
|
+
/**
|
|
321
|
+
* pin UpdateEstimate (LossBased ready): adopt the loss result, then
|
|
322
|
+
* ApplyTargetLimits. Without a delay result, do not min() against start.
|
|
323
|
+
*/
|
|
324
|
+
private combineDelayLossTarget;
|
|
325
|
+
/**
|
|
326
|
+
* pin `GoogCcNetworkController::ResetConstraints` + `ClampConstraints`.
|
|
327
|
+
*
|
|
328
|
+
* 1. min_target = provided min, or 0 (never the previous min)
|
|
329
|
+
* then min = max(min_target, kCongestionControllerMinBitrate)
|
|
330
|
+
* 2. max: finite and >0 stays (raised to min if below); 0 / non-finite
|
|
331
|
+
* is PlusInfinity (unset app cap — target 1 Gbps, probe 5 Mbps)
|
|
332
|
+
* 3. if start is set and below min, start = min
|
|
333
|
+
*
|
|
334
|
+
* `start = 0` stays 0 (pin optional starting_rate / skip SetSendBitrate).
|
|
335
|
+
*/
|
|
336
|
+
private clampConstraints;
|
|
337
|
+
/** pin send-side max: app max or kDefaultMaxBitrate (1 Gbps). */
|
|
338
|
+
private targetMaxBps;
|
|
339
|
+
/** pin probe max: app max or kDefaultMaxProbingBitrate (5 Mbps). */
|
|
340
|
+
private probeMaxBps;
|
|
341
|
+
/**
|
|
342
|
+
* Accrue pin padding_rate × elapsed into {@link paddingDueBytes}.
|
|
343
|
+
* Cap at 100ms of the current padding rate so idle ticks cannot explode.
|
|
344
|
+
*/
|
|
345
|
+
private accrueLossPadding;
|
|
346
|
+
private applyTargetLimits;
|
|
347
|
+
/**
|
|
348
|
+
* pin `SendSideBandwidthEstimation::IsInStartPhase`.
|
|
349
|
+
* True until the first TransportLossReport, then for {@link kStartPhaseMs}.
|
|
350
|
+
*/
|
|
351
|
+
private isInStartPhase;
|
|
352
|
+
/**
|
|
353
|
+
* pin UpdateEstimate startup branch:
|
|
354
|
+
* `last_fraction_loss_ == 0 && IsInStartPhase && !ReadyToUseInStartPhase`.
|
|
355
|
+
* Raises current_target to delay_based_limit (REMB not wired).
|
|
356
|
+
* Returns true when the pin path `UpdateTargetBitrate` + return fired.
|
|
357
|
+
*/
|
|
358
|
+
private maybeApplyStartupDelayEstimate;
|
|
359
|
+
/**
|
|
360
|
+
* pin `SendSideBandwidthEstimation::UpdateEstimate`.
|
|
361
|
+
*
|
|
362
|
+
* Shared by receiveTWCC (`UpdateLossBasedEstimator` → UpdateEstimate)
|
|
363
|
+
* and process() (`OnProcessInterval` → UpdateEstimate).
|
|
364
|
+
*/
|
|
365
|
+
private updateEstimate;
|
|
366
|
+
/**
|
|
367
|
+
* pin `SendSideBandwidthEstimation::UpdateEstimate` on OnProcessInterval.
|
|
368
|
+
* Does **not** invent a new delay sample.
|
|
369
|
+
*/
|
|
370
|
+
private updateEstimateOnProcessInterval;
|
|
371
|
+
/**
|
|
372
|
+
* pin `SendSideBandwidthEstimation::UpdateEstimate` RTT branch:
|
|
373
|
+
* drop first (if interval due), then ApplyTargetLimits (delay upper + min).
|
|
374
|
+
*
|
|
375
|
+
* Called from {@link process} (pin OnProcessInterval) and after TWCC when
|
|
376
|
+
* still RTT-limited. **Not** from `rtpPacketSent` (pin OnSentPacket).
|
|
377
|
+
* Returns true when a drop was applied.
|
|
378
|
+
*/
|
|
379
|
+
private maybeApplyRttBasedBackoff;
|
|
380
|
+
dispose(): void;
|
|
381
|
+
/**
|
|
382
|
+
* pin MaybeTriggerOnNetworkChanged — publish target, ALR budget, and
|
|
383
|
+
* ProbeController estimated bitrate + BandwidthLimitedCause.
|
|
384
|
+
* On {@link process} this runs **after** ProbeController::Process so the
|
|
385
|
+
* same tick still uses the previous cause (pin order).
|
|
386
|
+
*/
|
|
387
|
+
private propagateTarget;
|
|
388
|
+
/**
|
|
389
|
+
* pin OnTransportPacketsFeedback ALR-ended wiring (before delay/loss).
|
|
390
|
+
* Does **not** SetAlrStartTime — that is ProcessInterval + recovery only.
|
|
391
|
+
*/
|
|
392
|
+
private noteAlrLeave;
|
|
393
|
+
/**
|
|
394
|
+
* pin OnProcessInterval ALR wiring: SetAlrStartTime then leave detection.
|
|
395
|
+
* Does **not** enable periodic ALR probing (pin default false).
|
|
396
|
+
*/
|
|
397
|
+
private syncAlr;
|
|
398
|
+
/**
|
|
399
|
+
* Fired only when a cluster becomes the **pacing** front (activated).
|
|
400
|
+
* RTCRtpSender uses this for pace budget + padding injection — not for
|
|
401
|
+
* queued-but-not-yet-active configs (e.g. 6x while 3x is still sending).
|
|
402
|
+
*/
|
|
403
|
+
private onProbeClusterActivated;
|
|
404
|
+
private ensureProbing;
|
|
405
|
+
private pushInterArrival;
|
|
406
|
+
}
|