mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 20:57:47 +00:00
fix(connection-stats) fix rendering codec information
Ref: https://github.com/jitsi/lib-jitsi-meet/pull/2143
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
6e3b3879cc
commit
f5fc524030
@@ -35,17 +35,7 @@ export type Props = {
|
||||
/**
|
||||
* Custom icon style.
|
||||
*/
|
||||
iconStyle?: Object,
|
||||
|
||||
/**
|
||||
* The source name of the track.
|
||||
*/
|
||||
_sourceName: string,
|
||||
|
||||
/**
|
||||
* The flag whether source name signaling is enabled.
|
||||
*/
|
||||
_sourceNameSignalingEnabled: string
|
||||
iconStyle?: Object
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -100,13 +90,7 @@ class AbstractConnectionIndicator<P: Props, S: State> extends Component<P, S> {
|
||||
* returns {void}
|
||||
*/
|
||||
componentDidMount() {
|
||||
statsEmitter.subscribeToClientStats(
|
||||
this.props.participantId, this._onStatsUpdated);
|
||||
|
||||
if (this.props._sourceNameSignalingEnabled) {
|
||||
statsEmitter.subscribeToClientStats(
|
||||
this.props._sourceName, this._onStatsUpdated);
|
||||
}
|
||||
statsEmitter.subscribeToClientStats(this.props.participantId, this._onStatsUpdated);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,15 +106,6 @@ class AbstractConnectionIndicator<P: Props, S: State> extends Component<P, S> {
|
||||
statsEmitter.subscribeToClientStats(
|
||||
this.props.participantId, this._onStatsUpdated);
|
||||
}
|
||||
|
||||
if (this.props._sourceNameSignalingEnabled) {
|
||||
if (prevProps._sourceName !== this.props._sourceName) {
|
||||
statsEmitter.unsubscribeToClientStats(
|
||||
prevProps._sourceName, this._onStatsUpdated);
|
||||
statsEmitter.subscribeToClientStats(
|
||||
this.props._sourceName, this._onStatsUpdated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,13 +116,7 @@ class AbstractConnectionIndicator<P: Props, S: State> extends Component<P, S> {
|
||||
* @returns {void}
|
||||
*/
|
||||
componentWillUnmount() {
|
||||
statsEmitter.unsubscribeToClientStats(
|
||||
this.props.participantId, this._onStatsUpdated);
|
||||
|
||||
if (this.props._sourceNameSignalingEnabled) {
|
||||
statsEmitter.unsubscribeToClientStats(
|
||||
this.props._sourceName, this._onStatsUpdated);
|
||||
}
|
||||
statsEmitter.unsubscribeToClientStats(this.props.participantId, this._onStatsUpdated);
|
||||
|
||||
clearTimeout(this.autoHideTimeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user