|
@@ -616,11 +616,11 @@ JitsiConference.prototype.addTrack = function(track) {
|
616
|
616
|
|
617
|
617
|
/**
|
618
|
618
|
* Fires TRACK_AUDIO_LEVEL_CHANGED change conference event (for local tracks).
|
619
|
|
- * @param {TraceablePeerConnection|null} tpc
|
620
|
|
- * @param audioLevel the audio level
|
|
619
|
+ * @param {number} audioLevel the audio level
|
|
620
|
+ * @param {TraceablePeerConnection} [tpc]
|
621
|
621
|
*/
|
622
|
622
|
JitsiConference.prototype._fireAudioLevelChangeEvent
|
623
|
|
-= function(tpc, audioLevel) {
|
|
623
|
+= function(audioLevel, tpc) {
|
624
|
624
|
const activeTpc = this.getActivePeerConnection();
|
625
|
625
|
|
626
|
626
|
// There will be no TraceablePeerConnection if audio levels do not come from
|
|
@@ -628,7 +628,7 @@ JitsiConference.prototype._fireAudioLevelChangeEvent
|
628
|
628
|
// Audio Analyser API and emits local audio levels events through
|
629
|
629
|
// JitsiTrack.setAudioLevel, but does not provide TPC instance which is
|
630
|
630
|
// optional.
|
631
|
|
- if (tpc === null || activeTpc === tpc) {
|
|
631
|
+ if (!tpc || activeTpc === tpc) {
|
632
|
632
|
this.eventEmitter.emit(
|
633
|
633
|
JitsiConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
634
|
634
|
this.myUserId(), audioLevel);
|
|
@@ -1184,7 +1184,7 @@ JitsiConference.prototype.onRemoteTrackAdded = function(track) {
|
1184
|
1184
|
() => emitter.emit(JitsiConferenceEvents.TRACK_MUTE_CHANGED, track));
|
1185
|
1185
|
track.addEventListener(
|
1186
|
1186
|
JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED,
|
1187
|
|
- (tpc, audioLevel) => {
|
|
1187
|
+ (audioLevel, tpc) => {
|
1188
|
1188
|
const activeTPC = this.getActivePeerConnection();
|
1189
|
1189
|
|
1190
|
1190
|
if (activeTPC === tpc) {
|