mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-22 11:27:49 +00:00
fix(stats) split stats for camera and screenshare in multi-stream mode (#11475)
* no ssrc when sourceNameSignalingEnabled * conditionally use source name for stats * update doc * always subscribe to participant id
This commit is contained in:
@@ -161,7 +161,12 @@ type Props = {
|
||||
/**
|
||||
* Statistics related to transports.
|
||||
*/
|
||||
transport: Array<Object>
|
||||
transport: Array<Object>,
|
||||
|
||||
/**
|
||||
* Whether source name signaling is enabled.
|
||||
*/
|
||||
sourceNameSignalingEnabled: boolean
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -450,7 +455,7 @@ class ConnectionStatsTable extends Component<Props> {
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
_renderCodecs() {
|
||||
const { codec, t } = this.props;
|
||||
const { codec, t, sourceNameSignalingEnabled } = this.props;
|
||||
|
||||
if (!codec) {
|
||||
return;
|
||||
@@ -458,13 +463,17 @@ class ConnectionStatsTable extends Component<Props> {
|
||||
|
||||
let codecString;
|
||||
|
||||
// Only report one codec, in case there are multiple for a user.
|
||||
Object.keys(codec || {})
|
||||
.forEach(ssrc => {
|
||||
const { audio, video } = codec[ssrc];
|
||||
if (sourceNameSignalingEnabled) {
|
||||
codecString = `${codec.audio}, ${codec.video}`;
|
||||
} else {
|
||||
// Only report one codec, in case there are multiple for a user.
|
||||
Object.keys(codec || {})
|
||||
.forEach(ssrc => {
|
||||
const { audio, video } = codec[ssrc];
|
||||
|
||||
codecString = `${audio}, ${video}`;
|
||||
});
|
||||
codecString = `${audio}, ${video}`;
|
||||
});
|
||||
}
|
||||
|
||||
if (!codecString) {
|
||||
codecString = 'N/A';
|
||||
@@ -585,10 +594,17 @@ class ConnectionStatsTable extends Component<Props> {
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
_renderFrameRate() {
|
||||
const { framerate, t } = this.props;
|
||||
const frameRateString = Object.keys(framerate || {})
|
||||
.map(ssrc => framerate[ssrc])
|
||||
.join(', ') || 'N/A';
|
||||
const { framerate, t, sourceNameSignalingEnabled } = this.props;
|
||||
|
||||
let frameRateString;
|
||||
|
||||
if (sourceNameSignalingEnabled) {
|
||||
frameRateString = framerate || 'N/A';
|
||||
} else {
|
||||
frameRateString = Object.keys(framerate || {})
|
||||
.map(ssrc => framerate[ssrc])
|
||||
.join(', ') || 'N/A';
|
||||
}
|
||||
|
||||
return (
|
||||
<tr>
|
||||
@@ -650,14 +666,20 @@ class ConnectionStatsTable extends Component<Props> {
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
_renderResolution() {
|
||||
const { resolution, maxEnabledResolution, t } = this.props;
|
||||
let resolutionString = Object.keys(resolution || {})
|
||||
.map(ssrc => {
|
||||
const { width, height } = resolution[ssrc];
|
||||
const { resolution, maxEnabledResolution, t, sourceNameSignalingEnabled } = this.props;
|
||||
let resolutionString;
|
||||
|
||||
return `${width}x${height}`;
|
||||
})
|
||||
.join(', ') || 'N/A';
|
||||
if (sourceNameSignalingEnabled) {
|
||||
resolutionString = resolution ? `${resolution.width}x${resolution.height}` : 'N/A';
|
||||
} else {
|
||||
resolutionString = Object.keys(resolution || {})
|
||||
.map(ssrc => {
|
||||
const { width, height } = resolution[ssrc];
|
||||
|
||||
return `${width}x${height}`;
|
||||
})
|
||||
.join(', ') || 'N/A';
|
||||
}
|
||||
|
||||
if (maxEnabledResolution && maxEnabledResolution < 720) {
|
||||
const maxEnabledResolutionTitle = t('connectionindicator.maxEnabledResolution');
|
||||
|
||||
Reference in New Issue
Block a user