diff --git a/CHANGELOG.md b/CHANGELOG.md index 457ea67659..59aa808339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,12 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support for `WKWebView` on iOS. - Output a warning message when the volume adapter cleans up the self-attendee after reconnection. - Add FAQ for more information on `AudioJoinFromAnotherDevice` meeting session status code. -- Add downstream audio webrtc metrics in `observableMetricSpec` -- Add `getObservableVideoMetrics` and in ClientMetricReport to expose video stream metrics in webrtc -- Update `SignalingProtocol` with optional video metric fields +- Add downstream audio webrtc metrics in `observableMetricSpec`. +- Add `getObservableVideoMetrics` and in `ClientMetricReport` to expose video stream metrics in webrtc. +- Update `SignalingProtocol` with optional video metric fields. ### Changed -- Bump version for lodash, y18n, and ssri dependencies +- Bump version for lodash, y18n, and ssri dependencies. +- Mark `getObservableVideoMetrics` optional in ClientMetricReprt and `videoStreamIndex` and `selfAttendeeId` optional in `DefaultClientMetricReport`. ### Removed diff --git a/docs/classes/defaultclientmetricreport.html b/docs/classes/defaultclientmetricreport.html index 0ac0885aa6..f9b7f4bc73 100644 --- a/docs/classes/defaultclientmetricreport.html +++ b/docs/classes/defaultclientmetricreport.html @@ -140,13 +140,13 @@

Constructors

constructor

Returns DefaultClientMetricReport

@@ -174,7 +174,7 @@

currentSsrcs

currentSsrcs: {}
@@ -192,7 +192,7 @@

currentTimestampMs

currentTimestampMs: number = 0
@@ -202,7 +202,7 @@

globalMetricReport

globalMetricReport: GlobalMetricReport = new GlobalMetricReport()
@@ -212,7 +212,7 @@

previousTimestampMs

previousTimestampMs: number = 0
@@ -222,7 +222,7 @@

streamMetricReports

streamMetricReports: {}
@@ -247,7 +247,7 @@

bitsPerSecond

  • Parameters

    @@ -273,7 +273,7 @@

    clone

  • @@ -295,7 +295,7 @@

    countPerSecond

  • Parameters

    @@ -321,7 +321,7 @@

    decoderLossPercent

  • Parameters

    @@ -347,7 +347,7 @@

    getMetricMap

  • Parameters

    @@ -410,7 +410,7 @@

    getObservableMetricValue

  • Parameters

    @@ -434,7 +434,7 @@

    getObservableMetrics

    Returns {}

    @@ -456,7 +456,7 @@

    getObservableVideoMetricValue

  • Parameters

    @@ -483,7 +483,7 @@

    getObservableVideoMetrics

    Returns {}

    @@ -512,7 +512,7 @@

    identityValue

  • @@ -543,7 +543,7 @@

    packetLossPercent

  • Parameters

    @@ -569,7 +569,7 @@

    print

  • Returns void

    @@ -586,7 +586,7 @@

    removeDestroyedSsrcs

  • Returns void

    @@ -603,7 +603,7 @@

    secondsToMilliseconds

  • Parameters

    @@ -628,7 +628,7 @@

    Readonly audioDownstream<
    audioDownstreamMetricMap: object
    @@ -637,7 +637,7 @@

    bytesReceived

    bytesReceived: object
    @@ -646,7 +646,7 @@

    transform

    transform: (Anonymous function) = this.bitsPerSecond
    @@ -656,7 +656,7 @@

    type

    type: RTC_SPK_BITRATE = SdkMetric.Type.RTC_SPK_BITRATE
    @@ -667,7 +667,7 @@

    googCurrentDelayMs

    googCurrentDelayMs: object
    @@ -676,7 +676,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -686,7 +686,7 @@

    type

    type: RTC_SPK_CURRENT_DELAY_MS = SdkMetric.Type.RTC_SPK_CURRENT_DELAY_MS
    @@ -697,7 +697,7 @@

    googDecodingCTN

    googDecodingCTN: object
    @@ -706,7 +706,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -717,7 +717,7 @@

    googDecodingNormal

    googDecodingNormal: object
    @@ -726,7 +726,7 @@

    source

    source: string = "googDecodingCTN"
    @@ -736,7 +736,7 @@

    transform

    transform: (Anonymous function) = this.decoderLossPercent
    @@ -746,7 +746,7 @@

    type

    type: RTC_SPK_FRACTION_DECODER_LOSS_PERCENT = SdkMetric.Type.RTC_SPK_FRACTION_DECODER_LOSS_PERCENT
    @@ -757,7 +757,7 @@

    googJitterBufferMs

    googJitterBufferMs: object
    @@ -766,7 +766,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -776,7 +776,7 @@

    type

    type: RTC_SPK_JITTER_BUFFER_MS = SdkMetric.Type.RTC_SPK_JITTER_BUFFER_MS
    @@ -787,7 +787,7 @@

    googJitterReceived

    googJitterReceived: object
    @@ -796,7 +796,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -806,7 +806,7 @@

    type

    type: RTC_SPK_JITTER_MS = SdkMetric.Type.RTC_SPK_JITTER_MS
    @@ -817,7 +817,7 @@

    jitter

    jitter: object
    @@ -826,7 +826,7 @@

    transform

    transform: (Anonymous function) = this.secondsToMilliseconds
    @@ -836,7 +836,7 @@

    type

    type: RTC_SPK_JITTER_MS = SdkMetric.Type.RTC_SPK_JITTER_MS
    @@ -847,7 +847,7 @@

    packetsLost

    packetsLost: object
    @@ -856,7 +856,7 @@

    source

    source: string = "packetsReceived"
    @@ -866,7 +866,7 @@

    transform

    transform: (Anonymous function) = this.packetLossPercent
    @@ -876,7 +876,7 @@

    type

    type: RTC_SPK_FRACTION_PACKET_LOST_PERCENT = SdkMetric.Type.RTC_SPK_FRACTION_PACKET_LOST_PERCENT
    @@ -887,7 +887,7 @@

    packetsReceived

    packetsReceived: object
    @@ -896,7 +896,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -906,7 +906,7 @@

    type

    type: RTC_SPK_PPS = SdkMetric.Type.RTC_SPK_PPS
    @@ -918,7 +918,7 @@

    Readonly audioUpstreamaudioUpstreamMetricMap: object

  • @@ -927,7 +927,7 @@

    bytesSent

    bytesSent: object
    @@ -936,7 +936,7 @@

    transform

    transform: (Anonymous function) = this.bitsPerSecond
    @@ -946,7 +946,7 @@

    type

    type: RTC_MIC_BITRATE = SdkMetric.Type.RTC_MIC_BITRATE
    @@ -957,7 +957,7 @@

    googJitterReceived

    googJitterReceived: object
    @@ -966,7 +966,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -976,7 +976,7 @@

    type

    type: RTC_MIC_JITTER_MS = SdkMetric.Type.RTC_MIC_JITTER_MS
    @@ -987,7 +987,7 @@

    googRtt

    googRtt: object
    @@ -996,7 +996,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1006,7 +1006,7 @@

    type

    type: RTC_MIC_RTT_MS = SdkMetric.Type.RTC_MIC_RTT_MS
    @@ -1017,7 +1017,7 @@

    jitter

    jitter: object
    @@ -1026,7 +1026,7 @@

    transform

    transform: (Anonymous function) = this.secondsToMilliseconds
    @@ -1036,7 +1036,7 @@

    type

    type: RTC_MIC_JITTER_MS = SdkMetric.Type.RTC_MIC_JITTER_MS
    @@ -1047,7 +1047,7 @@

    packetsLost

    packetsLost: object
    @@ -1056,7 +1056,7 @@

    source

    source: string = "packetsSent"
    @@ -1066,7 +1066,7 @@

    transform

    transform: (Anonymous function) = this.packetLossPercent
    @@ -1076,7 +1076,7 @@

    type

    type: RTC_MIC_FRACTION_PACKET_LOST_PERCENT = SdkMetric.Type.RTC_MIC_FRACTION_PACKET_LOST_PERCENT
    @@ -1087,7 +1087,7 @@

    packetsSent

    packetsSent: object
    @@ -1096,7 +1096,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -1106,7 +1106,7 @@

    type

    type: RTC_MIC_PPS = SdkMetric.Type.RTC_MIC_PPS
    @@ -1118,7 +1118,7 @@

    Readonly globalMetricglobalMetricMap: object

    @@ -1132,7 +1132,7 @@

    availableIncomingBitrate

    availableIncomingBitrate: object
    @@ -1141,7 +1141,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1151,7 +1151,7 @@

    type

    type: VIDEO_AVAILABLE_RECEIVE_BANDWIDTH = SdkMetric.Type.VIDEO_AVAILABLE_RECEIVE_BANDWIDTH
    @@ -1162,7 +1162,7 @@

    availableOutgoingBitrate

    availableOutgoingBitrate: object
    @@ -1171,7 +1171,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1181,7 +1181,7 @@

    type

    type: VIDEO_AVAILABLE_SEND_BANDWIDTH = SdkMetric.Type.VIDEO_AVAILABLE_SEND_BANDWIDTH
    @@ -1192,7 +1192,7 @@

    currentRoundTripTime

    currentRoundTripTime: object
    @@ -1201,7 +1201,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1211,7 +1211,7 @@

    type

    type: STUN_RTT_MS = SdkMetric.Type.STUN_RTT_MS
    @@ -1222,7 +1222,7 @@

    googActualEncBitrate

    googActualEncBitrate: object
    @@ -1231,7 +1231,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1241,7 +1241,7 @@

    type

    type: VIDEO_ACTUAL_ENCODER_BITRATE = SdkMetric.Type.VIDEO_ACTUAL_ENCODER_BITRATE
    @@ -1252,7 +1252,7 @@

    googAvailableReceiveBandwidth

    googAvailableReceiveBandwidth: object
    @@ -1261,7 +1261,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1271,7 +1271,7 @@

    type

    type: VIDEO_AVAILABLE_RECEIVE_BANDWIDTH = SdkMetric.Type.VIDEO_AVAILABLE_RECEIVE_BANDWIDTH
    @@ -1282,7 +1282,7 @@

    googAvailableSendBandwidth

    googAvailableSendBandwidth: object
    @@ -1291,7 +1291,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1301,7 +1301,7 @@

    type

    type: VIDEO_AVAILABLE_SEND_BANDWIDTH = SdkMetric.Type.VIDEO_AVAILABLE_SEND_BANDWIDTH
    @@ -1312,7 +1312,7 @@

    googBucketDelay

    googBucketDelay: object
    @@ -1321,7 +1321,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1331,7 +1331,7 @@

    type

    type: VIDEO_BUCKET_DELAY_MS = SdkMetric.Type.VIDEO_BUCKET_DELAY_MS
    @@ -1342,7 +1342,7 @@

    googRetransmitBitrate

    googRetransmitBitrate: object
    @@ -1351,7 +1351,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1361,7 +1361,7 @@

    type

    type: VIDEO_RETRANSMIT_BITRATE = SdkMetric.Type.VIDEO_RETRANSMIT_BITRATE
    @@ -1372,7 +1372,7 @@

    googRtt

    googRtt: object
    @@ -1381,7 +1381,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1391,7 +1391,7 @@

    type

    type: STUN_RTT_MS = SdkMetric.Type.STUN_RTT_MS
    @@ -1402,7 +1402,7 @@

    googTargetEncBitrate

    googTargetEncBitrate: object
    @@ -1411,7 +1411,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -1421,7 +1421,7 @@

    type

    type: VIDEO_TARGET_ENCODER_BITRATE = SdkMetric.Type.VIDEO_TARGET_ENCODER_BITRATE
    @@ -1432,7 +1432,7 @@

    packetsDiscardedOnSend

    packetsDiscardedOnSend: object
    @@ -1441,7 +1441,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -1451,7 +1451,7 @@

    type

    type: SOCKET_DISCARDED_PPS = SdkMetric.Type.SOCKET_DISCARDED_PPS
    @@ -1463,7 +1463,7 @@

    Readonly observableMetric
    observableMetricSpec: object
    @@ -1477,7 +1477,7 @@

    audioDecoderLoss

    audioDecoderLoss: object
    @@ -1486,7 +1486,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -1496,7 +1496,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1506,7 +1506,7 @@

    source

    source: string = "googDecodingNormal"
    @@ -1517,7 +1517,7 @@

    audioPacketLossPercent

    audioPacketLossPercent: object
    @@ -1526,7 +1526,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1536,7 +1536,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1546,7 +1546,7 @@

    source

    source: string = "packetsLost"
    @@ -1557,7 +1557,7 @@

    audioPacketsReceived

    audioPacketsReceived: object
    @@ -1566,7 +1566,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -1576,7 +1576,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1586,7 +1586,7 @@

    source

    source: string = "packetsReceived"
    @@ -1597,7 +1597,7 @@

    audioPacketsReceivedFractionLoss

    audioPacketsReceivedFractionLoss: object
    @@ -1606,7 +1606,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -1616,7 +1616,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1626,7 +1626,7 @@

    source

    source: string = "packetsLost"
    @@ -1637,7 +1637,7 @@

    audioPacketsSent

    audioPacketsSent: object
    @@ -1646,7 +1646,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1656,7 +1656,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1666,7 +1666,7 @@

    source

    source: string = "packetsSent"
    @@ -1677,7 +1677,7 @@

    audioSpeakerDelayMs

    audioSpeakerDelayMs: object
    @@ -1686,7 +1686,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -1696,7 +1696,7 @@

    media

    media: AUDIO = MediaType.AUDIO
    @@ -1706,7 +1706,7 @@

    source

    source: string = "googCurrentDelayMs"
    @@ -1717,7 +1717,7 @@

    availableIncomingBitrate

    availableIncomingBitrate: object
    @@ -1726,7 +1726,7 @@

    source

    source: string = "availableIncomingBitrate"
    @@ -1737,7 +1737,7 @@

    availableOutgoingBitrate

    availableOutgoingBitrate: object
    @@ -1746,7 +1746,7 @@

    source

    source: string = "availableOutgoingBitrate"
    @@ -1757,7 +1757,7 @@

    availableReceiveBandwidth

    availableReceiveBandwidth: object
    @@ -1766,7 +1766,7 @@

    source

    source: string = "googAvailableReceiveBandwidth"
    @@ -1777,7 +1777,7 @@

    availableSendBandwidth

    availableSendBandwidth: object
    @@ -1786,7 +1786,7 @@

    source

    source: string = "googAvailableSendBandwidth"
    @@ -1797,7 +1797,7 @@

    googNackCountReceivedPerSecond

    googNackCountReceivedPerSecond: object
    @@ -1806,7 +1806,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1816,7 +1816,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -1826,7 +1826,7 @@

    source

    source: string = "googNacksReceived"
    @@ -1837,7 +1837,7 @@

    nackCountReceivedPerSecond

    nackCountReceivedPerSecond: object
    @@ -1846,7 +1846,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1856,7 +1856,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -1866,7 +1866,7 @@

    source

    source: string = "nackCount"
    @@ -1877,7 +1877,7 @@

    videoPacketSentPerSecond

    videoPacketSentPerSecond: object
    @@ -1886,7 +1886,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1896,7 +1896,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -1906,7 +1906,7 @@

    source

    source: string = "packetsSent"
    @@ -1917,7 +1917,7 @@

    videoUpstreamBitrate

    videoUpstreamBitrate: object
    @@ -1926,7 +1926,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -1936,7 +1936,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -1946,7 +1946,7 @@

    source

    source: string = "bytesSent"
    @@ -1958,7 +1958,7 @@

    Readonly observableVideo<
    observableVideoMetricSpec: object
    @@ -1972,7 +1972,7 @@

    videoDownstreamBitrate

    videoDownstreamBitrate: object
    @@ -1981,7 +1981,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -1991,7 +1991,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2001,7 +2001,7 @@

    source

    source: string = "bytesReceived"
    @@ -2012,7 +2012,7 @@

    videoDownstreamFrameHeight

    videoDownstreamFrameHeight: object
    @@ -2021,7 +2021,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2031,7 +2031,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2041,7 +2041,7 @@

    source

    source: string = "frameHeight"
    @@ -2052,7 +2052,7 @@

    videoDownstreamFrameWidth

    videoDownstreamFrameWidth: object
    @@ -2061,7 +2061,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2071,7 +2071,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2081,7 +2081,7 @@

    source

    source: string = "frameWidth"
    @@ -2092,7 +2092,7 @@

    videoDownstreamFramesDecodedPerSecond

    videoDownstreamFramesDecodedPerSecond: object
    @@ -2101,7 +2101,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2111,7 +2111,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2121,7 +2121,7 @@

    source

    source: string = "framesDecoded"
    @@ -2132,7 +2132,7 @@

    videoDownstreamGoogFrameHeight

    videoDownstreamGoogFrameHeight: object
    @@ -2141,7 +2141,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2151,7 +2151,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2161,7 +2161,7 @@

    source

    source: string = "googFrameHeightReceived"
    @@ -2172,7 +2172,7 @@

    videoDownstreamGoogFrameWidth

    videoDownstreamGoogFrameWidth: object
    @@ -2181,7 +2181,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2191,7 +2191,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2201,7 +2201,7 @@

    source

    source: string = "googFrameWidthReceived"
    @@ -2212,7 +2212,7 @@

    videoDownstreamPacketLossPercent

    videoDownstreamPacketLossPercent: object
    @@ -2221,7 +2221,7 @@

    dir

    dir: DOWNSTREAM = Direction.DOWNSTREAM
    @@ -2231,7 +2231,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2241,7 +2241,7 @@

    source

    source: string = "packetsLost"
    @@ -2252,7 +2252,7 @@

    videoUpstreamBitrate

    videoUpstreamBitrate: object
    @@ -2261,7 +2261,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2271,7 +2271,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2281,7 +2281,7 @@

    source

    source: string = "bytesSent"
    @@ -2292,7 +2292,7 @@

    videoUpstreamFrameHeight

    videoUpstreamFrameHeight: object
    @@ -2301,7 +2301,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2311,7 +2311,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2321,7 +2321,7 @@

    source

    source: string = "frameHeight"
    @@ -2332,7 +2332,7 @@

    videoUpstreamFrameWidth

    videoUpstreamFrameWidth: object
    @@ -2341,7 +2341,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2351,7 +2351,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2361,7 +2361,7 @@

    source

    source: string = "frameWidth"
    @@ -2372,7 +2372,7 @@

    videoUpstreamFramesEncodedPerSecond

    videoUpstreamFramesEncodedPerSecond: object
    @@ -2381,7 +2381,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2391,7 +2391,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2401,7 +2401,7 @@

    source

    source: string = "framesEncoded"
    @@ -2412,7 +2412,7 @@

    videoUpstreamGoogFrameHeight

    videoUpstreamGoogFrameHeight: object
    @@ -2421,7 +2421,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2431,7 +2431,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2441,7 +2441,7 @@

    source

    source: string = "googFrameHeightSent"
    @@ -2452,7 +2452,7 @@

    videoUpstreamGoogFrameWidth

    videoUpstreamGoogFrameWidth: object
    @@ -2461,7 +2461,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2471,7 +2471,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2481,7 +2481,7 @@

    source

    source: string = "googFrameWidthSent"
    @@ -2492,7 +2492,7 @@

    videoUpstreamPacketsSent

    videoUpstreamPacketsSent: object
    @@ -2501,7 +2501,7 @@

    dir

    dir: UPSTREAM = Direction.UPSTREAM
    @@ -2511,7 +2511,7 @@

    media

    media: VIDEO = MediaType.VIDEO
    @@ -2521,7 +2521,7 @@

    source

    source: string = "packetsSent"
    @@ -2533,7 +2533,7 @@

    Readonly videoDownstream<
    videoDownstreamMetricMap: object
    @@ -2542,7 +2542,7 @@

    bytesReceived

    bytesReceived: object
    @@ -2551,7 +2551,7 @@

    transform

    transform: (Anonymous function) = this.bitsPerSecond
    @@ -2561,7 +2561,7 @@

    type

    type: VIDEO_RECEIVED_BITRATE = SdkMetric.Type.VIDEO_RECEIVED_BITRATE
    @@ -2572,7 +2572,7 @@

    discardedPackets

    discardedPackets: object
    @@ -2581,7 +2581,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -2591,7 +2591,7 @@

    type

    type: VIDEO_DISCARDED_PPS = SdkMetric.Type.VIDEO_DISCARDED_PPS
    @@ -2602,7 +2602,7 @@

    firCount

    firCount: object
    @@ -2611,7 +2611,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -2621,7 +2621,7 @@

    type

    type: VIDEO_FIRS_SENT = SdkMetric.Type.VIDEO_FIRS_SENT
    @@ -2632,7 +2632,7 @@

    frameHeight

    frameHeight: object
    @@ -2641,7 +2641,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2651,7 +2651,7 @@

    type

    type: VIDEO_DECODE_HEIGHT = SdkMetric.Type.VIDEO_DECODE_HEIGHT
    @@ -2662,7 +2662,7 @@

    frameWidth

    frameWidth: object
    @@ -2671,7 +2671,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2681,7 +2681,7 @@

    type

    type: VIDEO_DECODE_WIDTH = SdkMetric.Type.VIDEO_DECODE_WIDTH
    @@ -2692,7 +2692,7 @@

    framerateMean

    framerateMean: object
    @@ -2701,7 +2701,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2711,7 +2711,7 @@

    type

    type: VIDEO_RECEIVED_FPS = SdkMetric.Type.VIDEO_RECEIVED_FPS
    @@ -2722,7 +2722,7 @@

    framesDecoded

    framesDecoded: object
    @@ -2731,7 +2731,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -2741,7 +2741,7 @@

    type

    type: VIDEO_DECODE_FPS = SdkMetric.Type.VIDEO_DECODE_FPS
    @@ -2752,7 +2752,7 @@

    googCurrentDelayMs

    googCurrentDelayMs: object
    @@ -2761,7 +2761,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2771,7 +2771,7 @@

    type

    type: VIDEO_CURRENT_DELAY_MS = SdkMetric.Type.VIDEO_CURRENT_DELAY_MS
    @@ -2782,7 +2782,7 @@

    googDecodeMs

    googDecodeMs: object
    @@ -2791,7 +2791,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2801,7 +2801,7 @@

    type

    type: VIDEO_DECODE_MS = SdkMetric.Type.VIDEO_DECODE_MS
    @@ -2812,7 +2812,7 @@

    googFirsSent

    googFirsSent: object
    @@ -2821,7 +2821,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -2831,7 +2831,7 @@

    type

    type: VIDEO_FIRS_SENT = SdkMetric.Type.VIDEO_FIRS_SENT
    @@ -2842,7 +2842,7 @@

    googFrameHeightReceived

    googFrameHeightReceived: object
    @@ -2851,7 +2851,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2861,7 +2861,7 @@

    type

    type: VIDEO_DECODE_HEIGHT = SdkMetric.Type.VIDEO_DECODE_HEIGHT
    @@ -2872,7 +2872,7 @@

    googFrameRateOutput

    googFrameRateOutput: object
    @@ -2881,7 +2881,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2891,7 +2891,7 @@

    type

    type: VIDEO_OUTPUT_FPS = SdkMetric.Type.VIDEO_OUTPUT_FPS
    @@ -2902,7 +2902,7 @@

    googFrameRateReceived

    googFrameRateReceived: object
    @@ -2911,7 +2911,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2921,7 +2921,7 @@

    type

    type: VIDEO_RECEIVED_FPS = SdkMetric.Type.VIDEO_RECEIVED_FPS
    @@ -2932,7 +2932,7 @@

    googFrameWidthReceived

    googFrameWidthReceived: object
    @@ -2941,7 +2941,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2951,7 +2951,7 @@

    type

    type: VIDEO_DECODE_WIDTH = SdkMetric.Type.VIDEO_DECODE_WIDTH
    @@ -2962,7 +2962,7 @@

    googJitterBufferMs

    googJitterBufferMs: object
    @@ -2971,7 +2971,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -2981,7 +2981,7 @@

    type

    type: VIDEO_JITTER_BUFFER_MS = SdkMetric.Type.VIDEO_JITTER_BUFFER_MS
    @@ -2992,7 +2992,7 @@

    googJitterReceived

    googJitterReceived: object
    @@ -3001,7 +3001,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3011,7 +3011,7 @@

    type

    type: VIDEO_RECEIVED_JITTER_MS = SdkMetric.Type.VIDEO_RECEIVED_JITTER_MS
    @@ -3022,7 +3022,7 @@

    googNacksSent

    googNacksSent: object
    @@ -3031,7 +3031,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3041,7 +3041,7 @@

    type

    type: VIDEO_NACKS_SENT = SdkMetric.Type.VIDEO_NACKS_SENT
    @@ -3052,7 +3052,7 @@

    googPlisSent

    googPlisSent: object
    @@ -3061,7 +3061,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3071,7 +3071,7 @@

    type

    type: VIDEO_PLIS_SENT = SdkMetric.Type.VIDEO_PLIS_SENT
    @@ -3082,7 +3082,7 @@

    googRenderDelayMs

    googRenderDelayMs: object
    @@ -3091,7 +3091,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3101,7 +3101,7 @@

    type

    type: VIDEO_RENDER_DELAY_MS = SdkMetric.Type.VIDEO_RENDER_DELAY_MS
    @@ -3112,7 +3112,7 @@

    googTargetDelayMs

    googTargetDelayMs: object
    @@ -3121,7 +3121,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3131,7 +3131,7 @@

    type

    type: VIDEO_TARGET_DELAY_MS = SdkMetric.Type.VIDEO_TARGET_DELAY_MS
    @@ -3142,7 +3142,7 @@

    jitter

    jitter: object
    @@ -3151,7 +3151,7 @@

    transform

    transform: (Anonymous function) = this.secondsToMilliseconds
    @@ -3161,7 +3161,7 @@

    type

    type: VIDEO_RECEIVED_JITTER_MS = SdkMetric.Type.VIDEO_RECEIVED_JITTER_MS
    @@ -3172,7 +3172,7 @@

    nackCount

    nackCount: object
    @@ -3181,7 +3181,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3191,7 +3191,7 @@

    type

    type: VIDEO_NACKS_SENT = SdkMetric.Type.VIDEO_NACKS_SENT
    @@ -3202,7 +3202,7 @@

    packetsLost

    packetsLost: object
    @@ -3211,7 +3211,7 @@

    source

    source: string = "packetsReceived"
    @@ -3221,7 +3221,7 @@

    transform

    transform: (Anonymous function) = this.packetLossPercent
    @@ -3231,7 +3231,7 @@

    type

    type: VIDEO_RECEIVED_FRACTION_PACKET_LOST_PERCENT = SdkMetric.Type.VIDEO_RECEIVED_FRACTION_PACKET_LOST_PERCENT
    @@ -3242,7 +3242,7 @@

    packetsReceived

    packetsReceived: object
    @@ -3251,7 +3251,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3261,7 +3261,7 @@

    type

    type: VIDEO_RECEIVED_PPS = SdkMetric.Type.VIDEO_RECEIVED_PPS
    @@ -3272,7 +3272,7 @@

    pliCount

    pliCount: object
    @@ -3281,7 +3281,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3291,7 +3291,7 @@

    type

    type: VIDEO_PLIS_SENT = SdkMetric.Type.VIDEO_PLIS_SENT
    @@ -3302,7 +3302,7 @@

    qpSum

    qpSum: object
    @@ -3311,7 +3311,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3321,7 +3321,7 @@

    type

    type: VIDEO_RECEIVED_QP_SUM = SdkMetric.Type.VIDEO_RECEIVED_QP_SUM
    @@ -3333,7 +3333,7 @@

    Readonly videoUpstreamvideoUpstreamMetricMap: object

    @@ -3342,7 +3342,7 @@

    bytesSent

    bytesSent: object
    @@ -3351,7 +3351,7 @@

    transform

    transform: (Anonymous function) = this.bitsPerSecond
    @@ -3361,7 +3361,7 @@

    type

    type: VIDEO_SENT_BITRATE = SdkMetric.Type.VIDEO_SENT_BITRATE
    @@ -3372,7 +3372,7 @@

    droppedFrames

    droppedFrames: object
    @@ -3381,7 +3381,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3391,7 +3391,7 @@

    type

    type: VIDEO_DROPPED_FPS = SdkMetric.Type.VIDEO_DROPPED_FPS
    @@ -3402,7 +3402,7 @@

    firCount

    firCount: object
    @@ -3411,7 +3411,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3421,7 +3421,7 @@

    type

    type: VIDEO_FIRS_RECEIVED = SdkMetric.Type.VIDEO_FIRS_RECEIVED
    @@ -3432,7 +3432,7 @@

    frameHeight

    frameHeight: object
    @@ -3441,7 +3441,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3451,7 +3451,7 @@

    type

    type: VIDEO_ENCODE_HEIGHT = SdkMetric.Type.VIDEO_ENCODE_HEIGHT
    @@ -3462,7 +3462,7 @@

    frameWidth

    frameWidth: object
    @@ -3471,7 +3471,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3481,7 +3481,7 @@

    type

    type: VIDEO_ENCODE_WIDTH = SdkMetric.Type.VIDEO_ENCODE_WIDTH
    @@ -3492,7 +3492,7 @@

    framerateMean

    framerateMean: object
    @@ -3501,7 +3501,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3511,7 +3511,7 @@

    type

    type: VIDEO_SENT_FPS = SdkMetric.Type.VIDEO_SENT_FPS
    @@ -3522,7 +3522,7 @@

    framesEncoded

    framesEncoded: object
    @@ -3531,7 +3531,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3541,7 +3541,7 @@

    type

    type: VIDEO_ENCODE_FPS = SdkMetric.Type.VIDEO_ENCODE_FPS
    @@ -3552,7 +3552,7 @@

    googAvgEncodeMs

    googAvgEncodeMs: object
    @@ -3561,7 +3561,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3571,7 +3571,7 @@

    type

    type: VIDEO_AVERAGE_ENCODE_MS = SdkMetric.Type.VIDEO_AVERAGE_ENCODE_MS
    @@ -3582,7 +3582,7 @@

    googEncodeUsagePercent

    googEncodeUsagePercent: object
    @@ -3591,7 +3591,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3601,7 +3601,7 @@

    type

    type: VIDEO_ENCODE_USAGE_PERCENT = SdkMetric.Type.VIDEO_ENCODE_USAGE_PERCENT
    @@ -3612,7 +3612,7 @@

    googFirsReceived

    googFirsReceived: object
    @@ -3621,7 +3621,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3631,7 +3631,7 @@

    type

    type: VIDEO_FIRS_RECEIVED = SdkMetric.Type.VIDEO_FIRS_RECEIVED
    @@ -3642,7 +3642,7 @@

    googFrameHeightSent

    googFrameHeightSent: object
    @@ -3651,7 +3651,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3661,7 +3661,7 @@

    type

    type: VIDEO_ENCODE_HEIGHT = SdkMetric.Type.VIDEO_ENCODE_HEIGHT
    @@ -3672,7 +3672,7 @@

    googFrameRateInput

    googFrameRateInput: object
    @@ -3681,7 +3681,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3691,7 +3691,7 @@

    type

    type: VIDEO_INPUT_FPS = SdkMetric.Type.VIDEO_INPUT_FPS
    @@ -3702,7 +3702,7 @@

    googFrameRateSent

    googFrameRateSent: object
    @@ -3711,7 +3711,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3721,7 +3721,7 @@

    type

    type: VIDEO_SENT_FPS = SdkMetric.Type.VIDEO_SENT_FPS
    @@ -3732,7 +3732,7 @@

    googFrameWidthSent

    googFrameWidthSent: object
    @@ -3741,7 +3741,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3751,7 +3751,7 @@

    type

    type: VIDEO_ENCODE_WIDTH = SdkMetric.Type.VIDEO_ENCODE_WIDTH
    @@ -3762,7 +3762,7 @@

    googNacksReceived

    googNacksReceived: object
    @@ -3771,7 +3771,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3781,7 +3781,7 @@

    type

    type: VIDEO_NACKS_RECEIVED = SdkMetric.Type.VIDEO_NACKS_RECEIVED
    @@ -3792,7 +3792,7 @@

    googPlisReceived

    googPlisReceived: object
    @@ -3801,7 +3801,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3811,7 +3811,7 @@

    type

    type: VIDEO_PLIS_RECEIVED = SdkMetric.Type.VIDEO_PLIS_RECEIVED
    @@ -3822,7 +3822,7 @@

    googRtt

    googRtt: object
    @@ -3831,7 +3831,7 @@

    transform

    transform: (Anonymous function) = this.identityValue
    @@ -3841,7 +3841,7 @@

    type

    type: VIDEO_SENT_RTT_MS = SdkMetric.Type.VIDEO_SENT_RTT_MS
    @@ -3852,7 +3852,7 @@

    nackCount

    nackCount: object
    @@ -3861,7 +3861,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3871,7 +3871,7 @@

    type

    type: VIDEO_NACKS_RECEIVED = SdkMetric.Type.VIDEO_NACKS_RECEIVED
    @@ -3882,7 +3882,7 @@

    packetsLost

    packetsLost: object
    @@ -3891,7 +3891,7 @@

    source

    source: string = "packetsSent"
    @@ -3901,7 +3901,7 @@

    transform

    transform: (Anonymous function) = this.packetLossPercent
    @@ -3911,7 +3911,7 @@

    type

    type: VIDEO_SENT_FRACTION_PACKET_LOST_PERCENT = SdkMetric.Type.VIDEO_SENT_FRACTION_PACKET_LOST_PERCENT
    @@ -3922,7 +3922,7 @@

    packetsSent

    packetsSent: object
    @@ -3931,7 +3931,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3941,7 +3941,7 @@

    type

    type: VIDEO_SENT_PPS = SdkMetric.Type.VIDEO_SENT_PPS
    @@ -3952,7 +3952,7 @@

    pliCount

    pliCount: object
    @@ -3961,7 +3961,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -3971,7 +3971,7 @@

    type

    type: VIDEO_PLIS_RECEIVED = SdkMetric.Type.VIDEO_PLIS_RECEIVED
    @@ -3982,7 +3982,7 @@

    qpSum

    qpSum: object
    @@ -3991,7 +3991,7 @@

    transform

    transform: (Anonymous function) = this.countPerSecond
    @@ -4001,7 +4001,7 @@

    type

    type: VIDEO_SENT_QP_SUM = SdkMetric.Type.VIDEO_SENT_QP_SUM
    diff --git a/docs/interfaces/clientmetricreport.html b/docs/interfaces/clientmetricreport.html index bf7a7b6563..07a1e74fd2 100644 --- a/docs/interfaces/clientmetricreport.html +++ b/docs/interfaces/clientmetricreport.html @@ -133,7 +133,7 @@
    [id: -

    getObservableVideoMetrics

    +

    Optional getObservableVideoMetrics

    • getObservableVideoMetrics(): {}
    diff --git a/src/clientmetricreport/ClientMetricReport.ts b/src/clientmetricreport/ClientMetricReport.ts index 974e881810..06d14d0b4d 100644 --- a/src/clientmetricreport/ClientMetricReport.ts +++ b/src/clientmetricreport/ClientMetricReport.ts @@ -14,5 +14,5 @@ export default interface ClientMetricReport { /** * Gets video client media metrics */ - getObservableVideoMetrics(): { [id: string]: { [id: string]: {} } }; + getObservableVideoMetrics?(): { [id: string]: { [id: string]: {} } }; } diff --git a/src/clientmetricreport/DefaultClientMetricReport.ts b/src/clientmetricreport/DefaultClientMetricReport.ts index 9009758580..e278fe4445 100644 --- a/src/clientmetricreport/DefaultClientMetricReport.ts +++ b/src/clientmetricreport/DefaultClientMetricReport.ts @@ -1,7 +1,6 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -import AudioVideoController from '../audiovideocontroller/AudioVideoController'; import Logger from '../logger/Logger'; import { SdkMetric } from '../signalingprotocol/SignalingProtocol.js'; import VideoStreamIndex from '../videostreamindex/VideoStreamIndex'; @@ -20,8 +19,8 @@ export default class DefaultClientMetricReport implements ClientMetricReport { constructor( private logger: Logger, - private videoStreamIndex: VideoStreamIndex, - private audioVideoController: AudioVideoController + private videoStreamIndex?: VideoStreamIndex, + private selfAttendeeId?: string ) {} /** @@ -558,6 +557,12 @@ export default class DefaultClientMetricReport implements ClientMetricReport { getObservableVideoMetrics(): { [id: string]: { [id: string]: {} } } { const videoStreamMetrics: { [id: string]: { [id: string]: {} } } = {}; + if (!this.videoStreamIndex || !this.selfAttendeeId) { + this.logger.error( + 'Need to define VideoStreamIndex and selfAttendeeId if using getObservableVideoMetrics API' + ); + return videoStreamMetrics; + } for (const ssrc in this.streamMetricReports) { if (this.streamMetricReports[ssrc].mediaType === MediaType.VIDEO) { const metric: { [id: string]: number } = {}; @@ -575,7 +580,7 @@ export default class DefaultClientMetricReport implements ClientMetricReport { const streamId = this.streamMetricReports[ssrc].streamId; const attendeeId = streamId ? this.videoStreamIndex.attendeeIdForStreamId(streamId) - : this.audioVideoController.configuration.credentials.attendeeId; + : this.selfAttendeeId; videoStreamMetrics[attendeeId] = videoStreamMetrics[attendeeId] ? videoStreamMetrics[attendeeId] : {}; @@ -593,7 +598,7 @@ export default class DefaultClientMetricReport implements ClientMetricReport { const cloned = new DefaultClientMetricReport( this.logger, this.videoStreamIndex, - this.audioVideoController + this.selfAttendeeId ); cloned.globalMetricReport = this.globalMetricReport; cloned.streamMetricReports = this.streamMetricReports; diff --git a/src/statscollector/DefaultStatsCollector.ts b/src/statscollector/DefaultStatsCollector.ts index 2e8d114330..feae5c2b8b 100644 --- a/src/statscollector/DefaultStatsCollector.ts +++ b/src/statscollector/DefaultStatsCollector.ts @@ -189,7 +189,7 @@ export default class DefaultStatsCollector implements StatsCollector { this.clientMetricReport = new DefaultClientMetricReport( this.logger, this.videoStreamIndex, - this.audioVideoController + this.audioVideoController.configuration.credentials.attendeeId ); } diff --git a/test/clientmetricreport/DefaultClientMetricReport.test.ts b/test/clientmetricreport/DefaultClientMetricReport.test.ts index 66371e023e..5aacb9e1d4 100644 --- a/test/clientmetricreport/DefaultClientMetricReport.test.ts +++ b/test/clientmetricreport/DefaultClientMetricReport.test.ts @@ -3,7 +3,6 @@ import * as chai from 'chai'; -import NoOpAudioVideoController from '../../src/audiovideocontroller/NoOpAudioVideoController'; import Direction from '../../src/clientmetricreport/ClientMetricReportDirection'; import MediaType from '../../src/clientmetricreport/ClientMetricReportMediaType'; import DefaultClientMetricReport from '../../src/clientmetricreport/DefaultClientMetricReport'; @@ -15,12 +14,13 @@ import DefaultVideoStreamIndex from '../../src/videostreamindex/DefaultVideoStre describe('DefaultClientMetricReport', () => { const expect: Chai.ExpectStatic = chai.expect; let clientMetricReport: DefaultClientMetricReport; + const selfAttendeeId = 'attendee-1'; beforeEach(() => { clientMetricReport = new DefaultClientMetricReport( new NoOpDebugLogger(), new DefaultVideoStreamIndex(new NoOpDebugLogger()), - new NoOpAudioVideoController() + selfAttendeeId ); }); @@ -400,8 +400,8 @@ describe('DefaultClientMetricReport', () => { audioUpstreamReport.currentMetrics['packetsSent'] = 100; clientMetricReport.streamMetricReports[audioUpstreamSsrc] = audioUpstreamReport; const videoStreamMetrics = clientMetricReport.getObservableVideoMetrics(); - expect(Object.keys(videoStreamMetrics[''][downstreamSsrc]).length).to.equal(0); - expect(Object.keys(videoStreamMetrics[''][upstreamSsrc]).length).to.equal(1); + expect(Object.keys(videoStreamMetrics[selfAttendeeId][downstreamSsrc]).length).to.equal(0); + expect(Object.keys(videoStreamMetrics[selfAttendeeId][upstreamSsrc]).length).to.equal(1); }); it('returns the observable video metrics for streams with streamId', () => { @@ -410,14 +410,12 @@ describe('DefaultClientMetricReport', () => { upstreamReport_1.mediaType = MediaType.VIDEO; upstreamReport_1.direction = Direction.UPSTREAM; upstreamReport_1.currentMetrics['framesEncoded'] = 100; - upstreamReport_1.streamId = 11; clientMetricReport.streamMetricReports[upstreamSsrc_1] = upstreamReport_1; const upstreamSsrc_2 = 12; const upstreamReport_2 = new StreamMetricReport(); upstreamReport_2.mediaType = MediaType.VIDEO; upstreamReport_2.direction = Direction.UPSTREAM; upstreamReport_2.currentMetrics['framesEncoded'] = 100; - upstreamReport_2.streamId = 12; clientMetricReport.streamMetricReports[upstreamSsrc_2] = upstreamReport_2; const downstreamSsrc = 22; const downstreamReport = new StreamMetricReport(); @@ -429,8 +427,8 @@ describe('DefaultClientMetricReport', () => { clientMetricReport.previousTimestampMs = 0; const videoStreamMetrics = clientMetricReport.getObservableVideoMetrics(); expect(Object.keys(videoStreamMetrics[''][downstreamSsrc]).length).to.equal(0); - expect(Object.keys(videoStreamMetrics[''][upstreamSsrc_1]).length).to.equal(1); - expect(Object.keys(videoStreamMetrics[''][upstreamSsrc_2]).length).to.equal(1); + expect(Object.keys(videoStreamMetrics[selfAttendeeId][upstreamSsrc_1]).length).to.equal(1); + expect(Object.keys(videoStreamMetrics[selfAttendeeId][upstreamSsrc_2]).length).to.equal(1); }); it('returns 0 observable video metrics if no desired report in stream metric reports', () => { @@ -480,4 +478,18 @@ describe('DefaultClientMetricReport', () => { expect(clientMetricReport.streamMetricReports[ssrc1]).to.equal(undefined); }); }); + + describe('error logging', () => { + it('returns undefined observable video metrics if no VideoStreamIndex and selfAttendeeId defined stream metric reports', () => { + clientMetricReport = new DefaultClientMetricReport(new NoOpDebugLogger()); + const ssrc = 1; + const report = new StreamMetricReport(); + report.mediaType = MediaType.VIDEO; + report.direction = Direction.UPSTREAM; + report.currentMetrics['framesEncoded'] = 10; + clientMetricReport.streamMetricReports[ssrc] = report; + const videoStreamMetrics = clientMetricReport.getObservableVideoMetrics(); + expect(Object.keys(videoStreamMetrics).length).to.equal(0); + }); + }); }); diff --git a/test/statscollector/DefaultStatsCollector.test.ts b/test/statscollector/DefaultStatsCollector.test.ts index 01d9536260..a58834c24a 100644 --- a/test/statscollector/DefaultStatsCollector.test.ts +++ b/test/statscollector/DefaultStatsCollector.test.ts @@ -76,7 +76,7 @@ describe('DefaultStatsCollector', () => { clientMetricReport = new DefaultClientMetricReport( logger, new DefaultVideoStreamIndex(logger), - audioVideoController + audioVideoController.configuration.credentials.attendeeId ); }); diff --git a/test/task/MonitorTask.test.ts b/test/task/MonitorTask.test.ts index 2b19388fdd..f69adb6e5b 100644 --- a/test/task/MonitorTask.test.ts +++ b/test/task/MonitorTask.test.ts @@ -383,11 +383,7 @@ describe('MonitorTask', () => { const clientMetricReport = new TestClientMetricReport(); task.metricsDidReceive(clientMetricReport); - const defaultClientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const defaultClientMetricReport = new DefaultClientMetricReport(logger); const ssrc = 6789; defaultClientMetricReport.streamMetricReports[ssrc] = new StreamMetricReport(); task.metricsDidReceive(defaultClientMetricReport); @@ -402,11 +398,7 @@ describe('MonitorTask', () => { streamMetricReport.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReport.direction = ClientMetricReportDirection.DOWNSTREAM; - const clientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new DefaultClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; task.metricsDidReceive(clientMetricReport); }); @@ -434,11 +426,7 @@ describe('MonitorTask', () => { streamMetricReportAudio.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReportAudio.direction = ClientMetricReportDirection.UPSTREAM; - const clientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new DefaultClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; clientMetricReport.streamMetricReports[56789] = streamMetricReportAudio; task.metricsDidReceive(clientMetricReport); @@ -477,11 +465,7 @@ describe('MonitorTask', () => { streamMetricReportAudio.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReportAudio.direction = ClientMetricReportDirection.UPSTREAM; - const clientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new DefaultClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; clientMetricReport.streamMetricReports[56789] = streamMetricReportAudio; task.metricsDidReceive(clientMetricReport); @@ -503,11 +487,7 @@ describe('MonitorTask', () => { streamMetricReport.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReport.direction = ClientMetricReportDirection.DOWNSTREAM; - const clientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new DefaultClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; task.metricsDidReceive(clientMetricReport); }); @@ -527,11 +507,7 @@ describe('MonitorTask', () => { streamMetricReport.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReport.direction = ClientMetricReportDirection.DOWNSTREAM; - const clientMetricReport = new DefaultClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new DefaultClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; task.metricsDidReceive(clientMetricReport); }); @@ -607,11 +583,7 @@ describe('MonitorTask', () => { streamMetricReportAudio.mediaType = ClientMetricReportMediaType.VIDEO; streamMetricReportAudio.direction = ClientMetricReportDirection.UPSTREAM; - const clientMetricReport = new TestClientMetricReport( - logger, - context.videoStreamIndex, - context.audioVideoController - ); + const clientMetricReport = new TestClientMetricReport(logger); clientMetricReport.streamMetricReports[1] = streamMetricReport; clientMetricReport.streamMetricReports[56789] = streamMetricReportAudio; task.metricsDidReceive(clientMetricReport); diff --git a/test/videodownlinkbandwidthpolicy/AllHighestVideoBandwidthPolicy.test.ts b/test/videodownlinkbandwidthpolicy/AllHighestVideoBandwidthPolicy.test.ts index 177a98055d..c16b17209d 100644 --- a/test/videodownlinkbandwidthpolicy/AllHighestVideoBandwidthPolicy.test.ts +++ b/test/videodownlinkbandwidthpolicy/AllHighestVideoBandwidthPolicy.test.ts @@ -3,7 +3,6 @@ import * as chai from 'chai'; -import NoOpAudioVideoController from '../../src/audiovideocontroller/NoOpAudioVideoController'; import DefaultClientMetricReport from '../../src/clientmetricreport/DefaultClientMetricReport'; import LogLevel from '../../src/logger/LogLevel'; import NoOpLogger from '../../src/logger/NoOpLogger'; @@ -221,11 +220,7 @@ describe('AllHighestVideoBandwidthPolicy', () => { }) ); - const metricReport = new DefaultClientMetricReport( - logger, - index, - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 1000; policy.updateIndex(index); diff --git a/test/videodownlinkbandwidthpolicy/NoVideoDownlinkBandwidthPolicy.test.ts b/test/videodownlinkbandwidthpolicy/NoVideoDownlinkBandwidthPolicy.test.ts index 8f18065aaa..857025c244 100644 --- a/test/videodownlinkbandwidthpolicy/NoVideoDownlinkBandwidthPolicy.test.ts +++ b/test/videodownlinkbandwidthpolicy/NoVideoDownlinkBandwidthPolicy.test.ts @@ -3,7 +3,6 @@ import * as chai from 'chai'; -import NoOpAudioVideoController from '../../src/audiovideocontroller/NoOpAudioVideoController'; import DefaultClientMetricReport from '../../src/clientmetricreport/DefaultClientMetricReport'; import LogLevel from '../../src/logger/LogLevel'; import NoOpLogger from '../../src/logger/NoOpLogger'; @@ -32,11 +31,7 @@ describe('NoVideoDownlinkBandwidthPolicy', () => { expect(policy.wantsResubscribe()).to.be.false; policy.updateIndex(emptyVideoStreamIndex); expect(policy.wantsResubscribe()).to.be.false; - const metricReport = new DefaultClientMetricReport( - logger, - emptyVideoStreamIndex, - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 500; policy.updateMetrics(metricReport); expect(policy.wantsResubscribe()).to.be.false; diff --git a/test/videodownlinkbandwidthpolicy/VideoAdaptiveProbePolicy.test.ts b/test/videodownlinkbandwidthpolicy/VideoAdaptiveProbePolicy.test.ts index 1cac7eb2c4..34823aa22d 100644 --- a/test/videodownlinkbandwidthpolicy/VideoAdaptiveProbePolicy.test.ts +++ b/test/videodownlinkbandwidthpolicy/VideoAdaptiveProbePolicy.test.ts @@ -5,7 +5,6 @@ import * as chai from 'chai'; import AudioVideoTileController from '../../src/audiovideocontroller/AudioVideoController'; import NoOpAudioVideoTileController from '../../src/audiovideocontroller/NoOpAudioVideoController'; -import NoOpAudioVideoController from '../../src/audiovideocontroller/NoOpAudioVideoController'; import ClientMetricReportDirection from '../../src/clientmetricreport/ClientMetricReportDirection'; import DefaultClientMetricReport from '../../src/clientmetricreport/DefaultClientMetricReport'; import GlobalMetricReport from '../../src/clientmetricreport/GlobalMetricReport'; @@ -18,7 +17,6 @@ import { SdkStreamMediaType, } from '../../src/signalingprotocol/SignalingProtocol'; import VideoAdaptiveProbePolicy from '../../src/videodownlinkbandwidthpolicy/VideoAdaptiveProbePolicy'; -import DefaultVideoStreamIndex from '../../src/videostreamindex/DefaultVideoStreamIndex'; import SimulcastVideoStreamIndex from '../../src/videostreamindex/SimulcastVideoStreamIndex'; import VideoTileController from '../../src/videotilecontroller/VideoTileController'; @@ -202,23 +200,13 @@ describe('VideoAdaptiveProbePolicy', () => { it('can be no-op if there are no streams available to subscribe', () => { videoStreamIndex.integrateIndexFrame(new SdkIndexFrame()); policy.updateIndex(videoStreamIndex); - policy.updateMetrics( - new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ) - ); + policy.updateMetrics(new DefaultClientMetricReport(logger)); }); it('can update metrics', () => { prepareVideoStreamIndex(videoStreamIndex); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); const streamReport1 = new StreamMetricReport(); streamReport1.streamId = 1; streamReport1.direction = ClientMetricReportDirection.DOWNSTREAM; @@ -289,11 +277,7 @@ describe('VideoAdaptiveProbePolicy', () => { const received = policy.chooseSubscriptions(); expect(received.array()).to.deep.equal([1, 3, 11, 22]); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableSendBandwidth'] = 4000 * 1000; metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 4000 * 1000; @@ -331,11 +315,7 @@ describe('VideoAdaptiveProbePolicy', () => { policy.MIN_TIME_BETWEEN_PROBE = 20; // @ts-ignore policy.STARTUP_PERIOD_MS = 5; - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableSendBandwidth'] = 4000 * 1000; metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 4000 * 1000; @@ -450,11 +430,7 @@ describe('VideoAdaptiveProbePolicy', () => { it('prefers content', () => { prepareVideoStreamIndex(videoStreamIndex); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2800 * 1000; policy.updateMetrics(metricReport); @@ -501,11 +477,7 @@ describe('VideoAdaptiveProbePolicy', () => { it('Includes paused stream in subscribe', () => { updateIndexFrame(videoStreamIndex, 4, 300, 600); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2800 * 1000; let resub = policy.wantsResubscribe(); @@ -567,11 +539,7 @@ describe('VideoAdaptiveProbePolicy', () => { expect(received.array()).to.deep.equal([2, 4, 6, 8]); incrementTime(6100); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 3600 * 1000; policy.updateMetrics(metricReport); @@ -632,11 +600,7 @@ describe('VideoAdaptiveProbePolicy', () => { expect(received.array()).to.deep.equal([2, 4, 6, 8]); incrementTime(6100); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 3600 * 1000; policy.updateMetrics(metricReport); @@ -699,11 +663,7 @@ describe('VideoAdaptiveProbePolicy', () => { expect(received.array()).to.deep.equal([2, 4, 6, 8]); incrementTime(6100); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 3600 * 1000; policy.updateMetrics(metricReport); @@ -759,11 +719,7 @@ describe('VideoAdaptiveProbePolicy', () => { expect(received.array()).to.deep.equal([2, 4, 6, 8]); incrementTime(6100); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 3600 * 1000; policy.updateMetrics(metricReport); diff --git a/test/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.test.ts b/test/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.test.ts index a2c8b2225f..c89d53972b 100644 --- a/test/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.test.ts +++ b/test/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy.test.ts @@ -6,7 +6,6 @@ import * as sinon from 'sinon'; import AudioVideoTileController from '../../src/audiovideocontroller/AudioVideoController'; import NoOpAudioVideoTileController from '../../src/audiovideocontroller/NoOpAudioVideoController'; -import NoOpAudioVideoController from '../../src/audiovideocontroller/NoOpAudioVideoController'; import ClientMetricReportDirection from '../../src/clientmetricreport/ClientMetricReportDirection'; import DefaultClientMetricReport from '../../src/clientmetricreport/DefaultClientMetricReport'; import GlobalMetricReport from '../../src/clientmetricreport/GlobalMetricReport'; @@ -24,7 +23,6 @@ import VideoDownlinkObserver from '../../src/videodownlinkbandwidthpolicy/VideoD import VideoPreference from '../../src/videodownlinkbandwidthpolicy/VideoPreference'; import { VideoPreferences } from '../../src/videodownlinkbandwidthpolicy/VideoPreferences'; import VideoPriorityBasedPolicy from '../../src/videodownlinkbandwidthpolicy/VideoPriorityBasedPolicy'; -import DefaultVideoStreamIndex from '../../src/videostreamindex/DefaultVideoStreamIndex'; import SimulcastVideoStreamIndex from '../../src/videostreamindex/SimulcastVideoStreamIndex'; import VideoTileController from '../../src/videotilecontroller/VideoTileController'; import DOMMockBuilder from '../dommock/DOMMockBuilder'; @@ -249,11 +247,7 @@ describe('VideoPriorityBasedPolicy', () => { it('no priority to priority', () => { updateIndexFrame(videoStreamIndex, 5, 0, 600); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2400 * 1000; policy.updateMetrics(metricReport); @@ -280,11 +274,7 @@ describe('VideoPriorityBasedPolicy', () => { it('priority to no priority', () => { updateIndexFrame(videoStreamIndex, 4, 0, 600); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2400 * 1000; policy.updateMetrics(metricReport); @@ -310,11 +300,7 @@ describe('VideoPriorityBasedPolicy', () => { it('priority value comparison checker', () => { updateIndexFrame(videoStreamIndex, 4, 0, 600); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2400 * 1000; policy.updateMetrics(metricReport); @@ -356,11 +342,7 @@ describe('VideoPriorityBasedPolicy', () => { policy.addObserver(observer); updateIndexFrame(videoStreamIndex, 2, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000; @@ -498,11 +480,7 @@ describe('VideoPriorityBasedPolicy', () => { tile4.stateRef().boundAttendeeId = 'attendee-4'; incrementTime(6100); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 2100 * 1000; policy.updateMetrics(metricReport); @@ -581,11 +559,7 @@ describe('VideoPriorityBasedPolicy', () => { const domMockBuilder = new DOMMockBuilder(); updateIndexFrame(videoStreamIndex, 2, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000; @@ -663,11 +637,7 @@ describe('VideoPriorityBasedPolicy', () => { it('Stream not added until enough bandwidth', () => { updateIndexFrame(videoStreamIndex, 3, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000; @@ -783,11 +753,7 @@ describe('VideoPriorityBasedPolicy', () => { it('Video Tile cleaned up if never subscribed', () => { updateIndexFrame(videoStreamIndex, 2, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000; @@ -884,11 +850,7 @@ describe('VideoPriorityBasedPolicy', () => { it('Video Tile cleaned up removed from preference list', () => { updateIndexFrame(videoStreamIndex, 2, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000; @@ -966,11 +928,7 @@ describe('VideoPriorityBasedPolicy', () => { it('dont change subscription with small change', () => { updateIndexFrame(videoStreamIndex, 4, 300, 1200); policy.updateIndex(videoStreamIndex); - const metricReport = new DefaultClientMetricReport( - logger, - new DefaultVideoStreamIndex(logger), - new NoOpAudioVideoController() - ); + const metricReport = new DefaultClientMetricReport(logger); metricReport.globalMetricReport = new GlobalMetricReport(); metricReport.globalMetricReport.currentMetrics['googAvailableReceiveBandwidth'] = 10000 * 1000;