@100mslive/hms-video-store
Advanced tools
Comparing version 0.2.54 to 0.2.55
{ | ||
"version": "0.2.54", | ||
"version": "0.2.55", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -1059,3 +1059,7 @@ import { | ||
private syncTrackState = (action: string, track: SDKHMSTrack, peer: sdkTypes.HMSPeer) => { | ||
private syncTrackState = ( | ||
action: 'trackAdded' | 'trackUpdate', | ||
track: SDKHMSTrack, | ||
peer: sdkTypes.HMSPeer, | ||
) => { | ||
console.time('trackUpdate'); | ||
@@ -1065,11 +1069,15 @@ this.setState(draftStore => { | ||
const hmsTrack = SDKToHMS.convertTrack(track); | ||
draftStore.tracks[track.trackId] = hmsTrack; | ||
if (hmsTrack.source === 'regular') { | ||
if (hmsTrack.type === 'audio') { | ||
draftPeer.audioTrack = hmsTrack.id; | ||
} else { | ||
draftPeer.videoTrack = hmsTrack.id; | ||
if (action === 'trackAdded') { | ||
draftStore.tracks[track.trackId] = hmsTrack; | ||
if (hmsTrack.source === 'regular') { | ||
if (hmsTrack.type === 'audio') { | ||
draftPeer.audioTrack = hmsTrack.id; | ||
} else { | ||
draftPeer.videoTrack = hmsTrack.id; | ||
} | ||
} else if (!draftPeer.auxiliaryTracks.includes(hmsTrack.id)) { | ||
draftPeer.auxiliaryTracks.push(hmsTrack.id); | ||
} | ||
} else if (!draftPeer.auxiliaryTracks.includes(hmsTrack.id)) { | ||
draftPeer.auxiliaryTracks.push(hmsTrack.id); | ||
} else { | ||
Object.assign(draftStore.tracks[hmsTrack.id], hmsTrack); | ||
} | ||
@@ -1100,4 +1108,8 @@ this.hmsSDKTracks[hmsTrack.id] = track; | ||
const hmsPeer = SDKToHMS.convertPeer(sdkPeer); | ||
draftStore.peers[hmsPeer.id] = hmsPeer as HMSPeer; | ||
draftStore.room.peers.push(hmsPeer.id); | ||
if (draftStore.peers[hmsPeer.id]) { | ||
Object.assign(draftStore.peers[hmsPeer.id], hmsPeer); | ||
} else { | ||
draftStore.peers[hmsPeer.id] = hmsPeer as HMSPeer; | ||
draftStore.room.peers.push(hmsPeer.id); | ||
} | ||
this.hmsSDKPeers[sdkPeer.peerId] = sdkPeer; | ||
@@ -1104,0 +1116,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1335832
14868