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 37
37
(rt ) => rt ?.kind === " video" && rt .track ,
38
38
);
39
39
remoteVidTrack = firstRemote ?.track || null ;
40
+ console .log (remoteVidTrack );
40
41
if (remoteVideoEl )
41
42
remoteVideoEl .srcObject = remoteVidTrack
42
43
? new MediaStream ([remoteVidTrack ])
Original file line number Diff line number Diff line change @@ -140,6 +140,24 @@ export class PulsebeamClient {
140
140
`Received track on MID ${ mid } (kind: ${ track . kind } ) but no matching subscription found. Stopping track.` ,
141
141
) ;
142
142
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
+ // };
143
161
}
144
162
} ;
145
163
You can’t perform that action at this time.
0 commit comments