Skip to content

Commit

Permalink
fix: streamline is active speaker mqa
Browse files Browse the repository at this point in the history
  • Loading branch information
evujici authored and edvujic committed May 13, 2024
1 parent 3b0d670 commit 24b5976
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const emptyVideoReceiveStream = {
ssci: 0, // Not avaliable
},
h264CodecProfile: 'BP',
isActiveSpeaker: true,
isActiveSpeaker: false,
optimalFrameSize: 0, // Not avaliable
receivedFrameSize: 0,
receivedHeight: 0,
Expand Down
4 changes: 4 additions & 0 deletions packages/@webex/plugin-meetings/src/statsAnalyzer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,10 @@ export class StatsAnalyzer extends EventsScope {
this.statsResults[mediaType][sendrecvType].totalSamplesDecoded =
result.totalSamplesDecoded || 0;
this.statsResults[mediaType][sendrecvType].concealedSamples = result.concealedSamples || 0;
this.statsResults[mediaType][sendrecvType].isActiveSpeaker =
result.isActiveSpeaker ||
(result.lastActiveSpeakerTimestamp &&
performance.timeOrigin + performance.now() - result.lastActiveSpeakerTimestamp < 60000);
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/@webex/plugin-meetings/src/statsAnalyzer/mqaUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ export const getVideoReceiverStreamMqa = ({
statsResults[mediaType][sendrecvType].keyFramesDecoded - lastKeyFramesDecoded || 0;
videoReceiverStream.requestedKeyFrames =
statsResults[mediaType][sendrecvType].totalPliCount - lastPliCount || 0;
videoReceiverStream.isActiveSpeaker =
statsResults[mediaType][sendrecvType].isActiveSpeaker || false;
};

export const getVideoSenderMqa = ({videoSender, statsResults, lastMqaDataSent, baseMediaType}) => {
Expand Down

0 comments on commit 24b5976

Please sign in to comment.