I was looking at the example code, and noticed that inside the onLocalTracks
function , it traverses through localTracks.length
, which for the most part stays as 2, with one for the audio feed and one for the video feed. I just wanted to know whether there exists a situation where there can be more than one local video/audio feed, making the length of the variable more than 2. If that’s not the case, could I safely use localVideo1
as the div id to extract, at any time?
Here’s the snippet of code i was referring to just in case
function onLocalTracks(tracks) {
localTracks = tracks;
for (let i = 0; i < localTracks.length; i++) {
// ....