From 42bd12cb5392571b2ff588db4f2a218512efc1c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:48:54 +0530 Subject: [PATCH] Update publish-alpha (#3167) Co-authored-by: Ravi theja Co-authored-by: Eswar Prasad Clinton. A <64120992+eswarclynn@users.noreply.github.com> Co-authored-by: Amar Bathwal <110378139+amar-1995@users.noreply.github.com> --- packages/hms-video-store/src/transport/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/hms-video-store/src/transport/index.ts b/packages/hms-video-store/src/transport/index.ts index 0f3338166d..b5c494f562 100644 --- a/packages/hms-video-store/src/transport/index.ts +++ b/packages/hms-video-store/src/transport/index.ts @@ -24,7 +24,7 @@ import { ErrorFactory } from '../error/ErrorFactory'; import { HMSAction } from '../error/HMSAction'; import { HMSException } from '../error/HMSException'; import { EventBus } from '../events/EventBus'; -import { HMSICEServer, HMSRole, HMSUpdateListener } from '../interfaces'; +import { HMSICEServer, HMSRole, HMSTrackUpdate, HMSUpdateListener } from '../interfaces'; import { HMSLocalStream } from '../media/streams/HMSLocalStream'; import { HMSLocalTrack, HMSLocalVideoTrack, HMSTrack } from '../media/tracks'; import { TrackState } from '../notification-manager'; @@ -532,6 +532,14 @@ export default class HMSTransport { this.trackStates.set(originalTrackState.track_id, newTrackState); HMSLogger.d(TAG, 'Track Update', this.trackStates, track); this.signal.trackUpdate(new Map([[originalTrackState.track_id, newTrackState]])); + const peer = this.store.getLocalPeer(); + if (peer) { + this.listener?.onTrackUpdate( + track.enabled ? HMSTrackUpdate.TRACK_UNMUTED : HMSTrackUpdate.TRACK_MUTED, + track, + peer, + ); + } } }