File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 3737 (rt ) => rt ?.kind === " video" && rt .track ,
3838 );
3939 remoteVidTrack = firstRemote ?.track || null ;
40+ console .log (remoteVidTrack );
4041 if (remoteVideoEl )
4142 remoteVideoEl .srcObject = remoteVidTrack
4243 ? new MediaStream ([remoteVidTrack ])
Original file line number Diff line number Diff line change @@ -140,6 +140,24 @@ export class PulsebeamClient {
140140 `Received track on MID ${ mid } (kind: ${ track . kind } ) but no matching subscription found. Stopping track.` ,
141141 ) ;
142142 track . stop ( ) ;
143+ // TODO: this is a hack to get auto subscribed
144+ // this.remoteTracks.setKey(track.id, {
145+ // slotId: mid,
146+ // remoteTrackId: track.id,
147+ // kind: track.kind as "video" | "audio",
148+ // track: track,
149+ // error: undefined,
150+ // });
151+ // track.onended = () => {
152+ // if (this.#instanceTerminated) return;
153+ // const currentTrackInfo = this.remoteTracks.get()[track.id];
154+ // if (currentTrackInfo) { // Ensure it hasn't been removed by unsubscribe
155+ // this.remoteTracks.setKey(track.id, {
156+ // ...currentTrackInfo,
157+ // track: null,
158+ // });
159+ // }
160+ // };
143161 }
144162 } ;
145163
You can’t perform that action at this time.
0 commit comments