@100mslive/hms-video-store 0.2.43 → 0.2.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,10 @@
1
- import { HMSPlaylistItem, HMSPlaylistType, HMSStore, IHMSPlaylistActions } from '../schema';
1
+ import { HMSPlaylistItem, HMSPlaylistType, IHMSPlaylistActions } from '../schema';
2
2
  import { HMSPlaylistManager } from './sdkTypes';
3
3
  export declare class HMSPlaylist implements IHMSPlaylistActions {
4
4
  private playlistManager;
5
- private syncRoomState;
6
- private setState;
5
+ private syncPlaylistState;
7
6
  private type;
8
- constructor(playlistManager: HMSPlaylistManager, type: HMSPlaylistType, syncRoomState: (name: string) => void, setState: (fn: (store: HMSStore) => void, name: string) => void);
7
+ constructor(playlistManager: HMSPlaylistManager, type: HMSPlaylistType, syncPlaylistState: (action: string) => void);
9
8
  play(id: string): Promise<void>;
10
9
  pause(id: string): Promise<void>;
11
10
  playNext(): Promise<void>;
@@ -15,5 +14,4 @@ export declare class HMSPlaylist implements IHMSPlaylistActions {
15
14
  setVolume(volume: number): void;
16
15
  setList<T>(list: HMSPlaylistItem<T>[]): void;
17
16
  stop(): Promise<void>;
18
- getCurrentTime(): number;
19
17
  }
@@ -136,6 +136,7 @@ export declare class HMSSDKActions implements IHMSActions {
136
136
  private onRoleUpdate;
137
137
  private getStoreLocalTrackIDfromSDKTrack;
138
138
  private setProgress;
139
+ private syncPlaylistState;
139
140
  /**
140
141
  * setState is separate so any future changes to how state change can be done from one place.
141
142
  * @param fn
@@ -23,6 +23,7 @@ export declare class SDKToHMS {
23
23
  };
24
24
  progress: number;
25
25
  volume: number;
26
+ currentTime: number;
26
27
  };
27
28
  video: {
28
29
  list: Record<string, HMSPlaylistItem<any>>;
@@ -33,6 +34,7 @@ export declare class SDKToHMS {
33
34
  };
34
35
  progress: number;
35
36
  volume: number;
37
+ currentTime: number;
36
38
  };
37
39
  };
38
40
  private static getConvertedPlaylistType;
@@ -24,12 +24,14 @@ export interface HMSPlaylist<T> {
24
24
  selection: HMSPlaylistSelection;
25
25
  progress: number;
26
26
  volume: number;
27
+ currentTime: number;
27
28
  };
28
29
  video: {
29
30
  list: Record<string, HMSPlaylistItem<T>>;
30
31
  selection: HMSPlaylistSelection;
31
32
  progress: number;
32
33
  volume: number;
34
+ currentTime: number;
33
35
  };
34
36
  }
35
37
  export interface IHMSPlaylistActions {
@@ -75,10 +77,6 @@ export interface IHMSPlaylistActions {
75
77
  * Stop the current playback and remove the tracks
76
78
  */
77
79
  stop(): Promise<void>;
78
- /**
79
- * Get current time of the current playing item
80
- */
81
- getCurrentTime(): number;
82
80
  }
83
81
  export interface HMSPlaylistSelector {
84
82
  list: <T>(store: HMSStore) => HMSPlaylistItem<T>[];
@@ -94,4 +92,5 @@ export interface HMSPlaylistSelector {
94
92
  selectedItem: <T>(store: HMSStore) => HMSPlaylistItem<T>;
95
93
  progress: (store: HMSStore) => number;
96
94
  volume: (store: HMSStore) => number;
95
+ currentTime: (store: HMSStore) => number;
97
96
  }
@@ -898,7 +898,8 @@ var createDefaultStoreState = function createDefaultStoreState() {
898
898
  hasNext: false
899
899
  },
900
900
  progress: 0,
901
- volume: 0
901
+ volume: 0,
902
+ currentTime: 0
902
903
  },
903
904
  video: {
904
905
  list: {},
@@ -908,7 +909,8 @@ var createDefaultStoreState = function createDefaultStoreState() {
908
909
  hasNext: false
909
910
  },
910
911
  progress: 0,
911
- volume: 0
912
+ volume: 0,
913
+ currentTime: 0
912
914
  }
913
915
  },
914
916
  messages: {
@@ -1245,10 +1247,10 @@ var SDKToHMS = /*#__PURE__*/function () {
1245
1247
  var volume = playlistManager.getVolume(type);
1246
1248
  var list = playlistManager.getList(type);
1247
1249
  var currentIndex = playlistManager.getCurrentIndex(type);
1248
- playlistManager.getList(type).forEach(function (value) {
1249
- var isSelected = value.url === (currentSelection == null ? void 0 : currentSelection.url);
1250
- convertedPlaylist[value.id] = _extends({}, value, {
1251
- type: value.type,
1250
+ playlistManager.getList(type).forEach(function (playlistItem) {
1251
+ var isSelected = playlistItem.url === (currentSelection == null ? void 0 : currentSelection.url);
1252
+ convertedPlaylist[playlistItem.id] = _extends({}, playlistItem, {
1253
+ type: playlistItem.type,
1252
1254
  selected: isSelected,
1253
1255
  playing: isSelected && isPlaying
1254
1256
  });
@@ -1261,7 +1263,8 @@ var SDKToHMS = /*#__PURE__*/function () {
1261
1263
  hasNext: currentIndex < list.length - 1
1262
1264
  },
1263
1265
  progress: progress,
1264
- volume: volume
1266
+ volume: volume,
1267
+ currentTime: playlistManager.getCurrentTime(type)
1265
1268
  };
1266
1269
  };
1267
1270
 
@@ -1754,6 +1757,16 @@ var selectPlaylistProgress = function selectPlaylistProgress(type) {
1754
1757
  };
1755
1758
  };
1756
1759
 
1760
+ var selectPlaylistCurrentTime = function selectPlaylistCurrentTime(type) {
1761
+ if (type === void 0) {
1762
+ type = exports.HMSPlaylistType.audio;
1763
+ }
1764
+
1765
+ return function (store) {
1766
+ return store.playlist[type].currentTime;
1767
+ };
1768
+ };
1769
+
1757
1770
  var selectPlaylistVolume = function selectPlaylistVolume(type) {
1758
1771
  if (type === void 0) {
1759
1772
  type = exports.HMSPlaylistType.audio;
@@ -1793,38 +1806,20 @@ var selectPlaylistSelectedItem = function selectPlaylistSelectedItem(type) {
1793
1806
  };
1794
1807
 
1795
1808
  var selectAudioPlaylist = {
1796
- selection: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistSelection(exports.HMSPlaylistType.audio), function (selection) {
1797
- return selection;
1798
- }),
1799
- progress: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistProgress(exports.HMSPlaylistType.audio), function (progress) {
1800
- return progress;
1801
- }),
1802
- volume: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistVolume(exports.HMSPlaylistType.audio), function (volume) {
1803
- return volume;
1804
- }),
1805
- list: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylist(exports.HMSPlaylistType.audio), function (list) {
1806
- return list;
1807
- }),
1808
- selectedItem: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistSelectedItem(exports.HMSPlaylistType.audio), function (selectedItem) {
1809
- return selectedItem;
1810
- })
1809
+ selection: /*#__PURE__*/selectPlaylistSelection(exports.HMSPlaylistType.audio),
1810
+ progress: /*#__PURE__*/selectPlaylistProgress(exports.HMSPlaylistType.audio),
1811
+ currentTime: /*#__PURE__*/selectPlaylistCurrentTime(exports.HMSPlaylistType.audio),
1812
+ volume: /*#__PURE__*/selectPlaylistVolume(exports.HMSPlaylistType.audio),
1813
+ list: /*#__PURE__*/selectPlaylist(exports.HMSPlaylistType.audio),
1814
+ selectedItem: /*#__PURE__*/selectPlaylistSelectedItem(exports.HMSPlaylistType.audio)
1811
1815
  };
1812
1816
  var selectVideoPlaylist = {
1813
- selection: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistSelection(exports.HMSPlaylistType.video), function (selection) {
1814
- return selection;
1815
- }),
1816
- progress: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistProgress(exports.HMSPlaylistType.video), function (progress) {
1817
- return progress;
1818
- }),
1819
- volume: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistVolume(exports.HMSPlaylistType.video), function (volume) {
1820
- return volume;
1821
- }),
1822
- list: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylist(exports.HMSPlaylistType.video), function (list) {
1823
- return list;
1824
- }),
1825
- selectedItem: /*#__PURE__*/reselect.createSelector( /*#__PURE__*/selectPlaylistSelectedItem(exports.HMSPlaylistType.video), function (selectedItem) {
1826
- return selectedItem;
1827
- })
1817
+ selection: /*#__PURE__*/selectPlaylistSelection(exports.HMSPlaylistType.video),
1818
+ progress: /*#__PURE__*/selectPlaylistProgress(exports.HMSPlaylistType.video),
1819
+ currentTime: /*#__PURE__*/selectPlaylistCurrentTime(exports.HMSPlaylistType.audio),
1820
+ volume: /*#__PURE__*/selectPlaylistVolume(exports.HMSPlaylistType.video),
1821
+ list: /*#__PURE__*/selectPlaylist(exports.HMSPlaylistType.video),
1822
+ selectedItem: /*#__PURE__*/selectPlaylistSelectedItem(exports.HMSPlaylistType.video)
1828
1823
  };
1829
1824
 
1830
1825
  var HMS_STORE_TAG = 'HMS-Store:';
@@ -2385,10 +2380,9 @@ function isRemoteTrack(track) {
2385
2380
  }
2386
2381
 
2387
2382
  var HMSPlaylist = /*#__PURE__*/function () {
2388
- function HMSPlaylist(playlistManager, type, syncRoomState, setState) {
2383
+ function HMSPlaylist(playlistManager, type, syncPlaylistState) {
2389
2384
  this.playlistManager = playlistManager;
2390
- this.syncRoomState = syncRoomState;
2391
- this.setState = setState;
2385
+ this.syncPlaylistState = syncPlaylistState;
2392
2386
  this.type = type;
2393
2387
  }
2394
2388
 
@@ -2416,9 +2410,6 @@ var HMSPlaylist = /*#__PURE__*/function () {
2416
2410
  });
2417
2411
 
2418
2412
  case 5:
2419
- this.syncRoomState("playOn" + this.type + "Playlist");
2420
-
2421
- case 6:
2422
2413
  case "end":
2423
2414
  return _context.stop();
2424
2415
  }
@@ -2455,7 +2446,7 @@ var HMSPlaylist = /*#__PURE__*/function () {
2455
2446
  });
2456
2447
 
2457
2448
  case 5:
2458
- this.syncRoomState("pauseOn" + this.type + "Playlist");
2449
+ this.syncPlaylistState("pauseOn" + this.type + "Playlist");
2459
2450
 
2460
2451
  case 6:
2461
2452
  case "end":
@@ -2482,9 +2473,6 @@ var HMSPlaylist = /*#__PURE__*/function () {
2482
2473
  return this.playlistManager.playNext(this.type);
2483
2474
 
2484
2475
  case 2:
2485
- this.syncRoomState("playPreviousOn" + this.type + "Playlist");
2486
-
2487
- case 3:
2488
2476
  case "end":
2489
2477
  return _context3.stop();
2490
2478
  }
@@ -2509,9 +2497,6 @@ var HMSPlaylist = /*#__PURE__*/function () {
2509
2497
  return this.playlistManager.playPrevious(this.type);
2510
2498
 
2511
2499
  case 2:
2512
- this.syncRoomState("playPreviousOn" + this.type + "Playlist");
2513
-
2514
- case 3:
2515
2500
  case "end":
2516
2501
  return _context4.stop();
2517
2502
  }
@@ -2527,35 +2512,23 @@ var HMSPlaylist = /*#__PURE__*/function () {
2527
2512
  }();
2528
2513
 
2529
2514
  _proto.seek = function seek(seekValue) {
2530
- var _this = this;
2531
-
2532
2515
  this.playlistManager.seek(seekValue, this.type);
2533
- this.setState(function (draftStore) {
2534
- draftStore.playlist[_this.type].progress = SDKToHMS.convertPlaylist(_this.playlistManager)[_this.type].progress;
2535
- }, "seekOn" + this.type + "Playlist");
2516
+ this.syncPlaylistState("seekOn" + this.type + "Playlist");
2536
2517
  };
2537
2518
 
2538
2519
  _proto.seekTo = function seekTo(seekValue) {
2539
- var _this2 = this;
2540
-
2541
2520
  this.playlistManager.seekTo(seekValue, this.type);
2542
- this.setState(function (draftStore) {
2543
- draftStore.playlist[_this2.type].progress = SDKToHMS.convertPlaylist(_this2.playlistManager)[_this2.type].progress;
2544
- }, "seekToOn" + this.type + "Playlist");
2521
+ this.syncPlaylistState("seekToOn" + this.type + "Playlist");
2545
2522
  };
2546
2523
 
2547
2524
  _proto.setVolume = function setVolume(volume) {
2548
- var _this3 = this;
2549
-
2550
2525
  this.playlistManager.setVolume(volume, this.type);
2551
- this.setState(function (draftStore) {
2552
- draftStore.playlist[_this3.type].volume = SDKToHMS.convertPlaylist(_this3.playlistManager)[_this3.type].volume;
2553
- }, "setVolumeOn" + this.type + "Playlist");
2526
+ this.syncPlaylistState("setVolumeOn" + this.type + "Playlist");
2554
2527
  };
2555
2528
 
2556
2529
  _proto.setList = function setList(list) {
2557
2530
  this.playlistManager.setList(list);
2558
- this.syncRoomState("setListOn" + this.type + "Playlist");
2531
+ this.syncPlaylistState("setListOn" + this.type + "Playlist");
2559
2532
  };
2560
2533
 
2561
2534
  _proto.stop = /*#__PURE__*/function () {
@@ -2568,7 +2541,7 @@ var HMSPlaylist = /*#__PURE__*/function () {
2568
2541
  return this.playlistManager.stop(this.type);
2569
2542
 
2570
2543
  case 2:
2571
- this.syncRoomState("stop" + this.type + "Playlist");
2544
+ this.syncPlaylistState("stop" + this.type + "Playlist");
2572
2545
 
2573
2546
  case 3:
2574
2547
  case "end":
@@ -2585,10 +2558,6 @@ var HMSPlaylist = /*#__PURE__*/function () {
2585
2558
  return stop;
2586
2559
  }();
2587
2560
 
2588
- _proto.getCurrentTime = function getCurrentTime() {
2589
- return this.playlistManager.getCurrentTime(this.type);
2590
- };
2591
-
2592
2561
  return HMSPlaylist;
2593
2562
  }();
2594
2563
 
@@ -2627,8 +2596,36 @@ var HMSSDKActions = /*#__PURE__*/function () {
2627
2596
 
2628
2597
  _this.setState(function (draftStore) {
2629
2598
  draftStore.playlist[type].progress = progress;
2599
+ draftStore.playlist[type].currentTime = _this.sdk.getPlaylistManager().getCurrentTime(type);
2630
2600
  }, 'playlistProgress');
2631
2601
  };
2602
+
2603
+ this.syncPlaylistState = function (action) {
2604
+ var sdkPeers = _this.sdk.getPeers();
2605
+
2606
+ var newHmsTracks = {};
2607
+
2608
+ for (var _iterator = _createForOfIteratorHelperLoose(sdkPeers), _step; !(_step = _iterator()).done;) {
2609
+ var sdkPeer = _step.value;
2610
+ var sdkTracks = [sdkPeer.audioTrack, sdkPeer.videoTrack].concat(sdkPeer.auxiliaryTracks);
2611
+
2612
+ for (var _iterator2 = _createForOfIteratorHelperLoose(sdkTracks), _step2; !(_step2 = _iterator2()).done;) {
2613
+ var sdkTrack = _step2.value;
2614
+
2615
+ if (!sdkTrack) {
2616
+ continue;
2617
+ }
2618
+
2619
+ var hmsTrack = SDKToHMS.convertTrack(sdkTrack);
2620
+ newHmsTracks[hmsTrack.id] = hmsTrack;
2621
+ }
2622
+ }
2623
+
2624
+ _this.setState(function (draftStore) {
2625
+ mergeNewTracksInDraft(draftStore.tracks, newHmsTracks);
2626
+ Object.assign(draftStore.playlist, SDKToHMS.convertPlaylist(_this.sdk.getPlaylistManager()));
2627
+ }, action);
2628
+ };
2632
2629
  /**
2633
2630
  * setState is separate so any future changes to how state change can be done from one place.
2634
2631
  * @param fn
@@ -3940,16 +3937,16 @@ var HMSSDKActions = /*#__PURE__*/function () {
3940
3937
  var newMediaSettings = {};
3941
3938
  var sdkPeers = this.sdk.getPeers(); // first convert everything in the new format
3942
3939
 
3943
- for (var _iterator = _createForOfIteratorHelperLoose(sdkPeers), _step; !(_step = _iterator()).done;) {
3944
- var sdkPeer = _step.value;
3940
+ for (var _iterator3 = _createForOfIteratorHelperLoose(sdkPeers), _step3; !(_step3 = _iterator3()).done;) {
3941
+ var sdkPeer = _step3.value;
3945
3942
  var hmsPeer = SDKToHMS.convertPeer(sdkPeer);
3946
3943
  newHmsPeers[hmsPeer.id] = hmsPeer;
3947
3944
  newHmsPeerIDs.push(hmsPeer.id);
3948
3945
  this.hmsSDKPeers[hmsPeer.id] = sdkPeer;
3949
3946
  var sdkTracks = [sdkPeer.audioTrack, sdkPeer.videoTrack].concat(sdkPeer.auxiliaryTracks);
3950
3947
 
3951
- for (var _iterator2 = _createForOfIteratorHelperLoose(sdkTracks), _step2; !(_step2 = _iterator2()).done;) {
3952
- var sdkTrack = _step2.value;
3948
+ for (var _iterator4 = _createForOfIteratorHelperLoose(sdkTracks), _step4; !(_step4 = _iterator4()).done;) {
3949
+ var sdkTrack = _step4.value;
3953
3950
 
3954
3951
  if (!sdkTrack) {
3955
3952
  continue;
@@ -3991,15 +3988,23 @@ var HMSSDKActions = /*#__PURE__*/function () {
3991
3988
  };
3992
3989
 
3993
3990
  _proto.onJoin = function onJoin(sdkRoom) {
3991
+ var _this9 = this;
3992
+
3994
3993
  this.setState(function (store) {
3995
3994
  Object.assign(store.room, SDKToHMS.convertRoom(sdkRoom));
3996
3995
  store.room.isConnected = true;
3997
3996
  store.room.roomState = exports.HMSRoomState.Connected;
3998
3997
  }, 'joined');
3999
- this.audioPlaylist = new HMSPlaylist(this.sdk.getPlaylistManager(), exports.HMSPlaylistType.audio, this.syncRoomState.bind(this), this.setState.bind(this));
4000
- this.videoPlaylist = new HMSPlaylist(this.sdk.getPlaylistManager(), exports.HMSPlaylistType.video, this.syncRoomState.bind(this), this.setState.bind(this));
3998
+ this.audioPlaylist = new HMSPlaylist(this.sdk.getPlaylistManager(), exports.HMSPlaylistType.audio, this.syncPlaylistState.bind(this));
3999
+ this.videoPlaylist = new HMSPlaylist(this.sdk.getPlaylistManager(), exports.HMSPlaylistType.video, this.syncRoomState.bind(this));
4001
4000
  this.syncRoomState('joinSync');
4002
4001
  this.sdk.getPlaylistManager().onProgress(this.setProgress);
4002
+ this.sdk.getPlaylistManager().onNewTrackStart(function (item) {
4003
+ _this9.syncPlaylistState("playOn" + item.type + "Playlist");
4004
+ });
4005
+ this.sdk.getPlaylistManager().onPlaylistEnded(function (type) {
4006
+ _this9.syncPlaylistState(type + "PlaylistEnded");
4007
+ });
4003
4008
  };
4004
4009
 
4005
4010
  _proto.onRoomUpdate = function onRoomUpdate() {
@@ -4051,10 +4056,10 @@ var HMSSDKActions = /*#__PURE__*/function () {
4051
4056
  };
4052
4057
 
4053
4058
  _proto.onHMSMessage = function onHMSMessage(hmsMessage) {
4054
- var _this9 = this;
4059
+ var _this10 = this;
4055
4060
 
4056
4061
  this.setState(function (store) {
4057
- hmsMessage.id = String(_this9.store.getState(selectHMSMessagesCount) + 1);
4062
+ hmsMessage.id = String(_this10.store.getState(selectHMSMessagesCount) + 1);
4058
4063
  store.messages.byID[hmsMessage.id] = hmsMessage;
4059
4064
  store.messages.allIDs.push(hmsMessage.id);
4060
4065
  }, 'newMessage');
@@ -4169,26 +4174,26 @@ var HMSSDKActions = /*#__PURE__*/function () {
4169
4174
  };
4170
4175
 
4171
4176
  _proto.handleTrackRemove = function handleTrackRemove(sdkTrack, sdkPeer) {
4172
- var _this10 = this;
4177
+ var _this11 = this;
4173
4178
 
4174
4179
  this.setState(function (draftStore) {
4175
4180
  var hmsPeer = draftStore.peers[sdkPeer.peerId];
4176
4181
  var draftTracks = draftStore.tracks; // find and remove the exact track from hmsPeer
4177
4182
 
4178
- if (_this10.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.audioTrack)) {
4183
+ if (_this11.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.audioTrack)) {
4179
4184
  hmsPeer == null ? true : delete hmsPeer.audioTrack;
4180
- } else if (_this10.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.videoTrack)) {
4185
+ } else if (_this11.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.videoTrack)) {
4181
4186
  hmsPeer == null ? true : delete hmsPeer.videoTrack;
4182
4187
  } else {
4183
4188
  var auxiliaryIndex = hmsPeer == null ? void 0 : hmsPeer.auxiliaryTracks.indexOf(sdkTrack.trackId);
4184
4189
 
4185
- if (auxiliaryIndex > -1 && _this10.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.auxiliaryTracks[auxiliaryIndex])) {
4190
+ if (auxiliaryIndex > -1 && _this11.isSameStoreSDKTrack(sdkTrack.trackId, hmsPeer == null ? void 0 : hmsPeer.auxiliaryTracks[auxiliaryIndex])) {
4186
4191
  hmsPeer == null ? void 0 : hmsPeer.auxiliaryTracks.splice(auxiliaryIndex, 1);
4187
4192
  }
4188
4193
  }
4189
4194
 
4190
4195
  delete draftTracks[sdkTrack.trackId];
4191
- delete _this10.hmsSDKTracks[sdkTrack.trackId];
4196
+ delete _this11.hmsSDKTracks[sdkTrack.trackId];
4192
4197
  }, 'trackRemoved');
4193
4198
  };
4194
4199
 
@@ -4548,11 +4553,11 @@ var HMSSDKActions = /*#__PURE__*/function () {
4548
4553
  };
4549
4554
 
4550
4555
  _proto.getStoreLocalTrackIDfromSDKTrack = function getStoreLocalTrackIDfromSDKTrack(sdkTrack) {
4551
- var _this11 = this;
4556
+ var _this12 = this;
4552
4557
 
4553
4558
  var trackIDs = this.store.getState(selectLocalTrackIDs);
4554
4559
  return trackIDs.find(function (trackID) {
4555
- return _this11.hmsSDKTracks[trackID].trackId === sdkTrack.trackId;
4560
+ return _this12.hmsSDKTracks[trackID].trackId === sdkTrack.trackId;
4556
4561
  });
4557
4562
  };
4558
4563