Multiple video tracks

I have a default stream for audio + video, and I was using streamless tracks and it was like butter, but I’m trying to implement screen sharing without replacing the video track with the share track

I started to send the stream with the track to differentiate the track that was received from the normal stream and the share stream, well still this behavior doesn’t tell me if the received track is from the share source or not, It tells me only that the received track is from a different stream which is not enough.

Is there any way I can send a label or any metadata while adding the track to the pc, something similar to sending an appData while producing in media-soup?

@saghul If you can help it would be great

One way would be to read the stream or track ID and send it using whatever signalling to the recipient, indicating the track type.

sounds good, thanks @saghul

@saghul I used a workaround previously that worked with me, which is whenever we create the stream we assign a new id for it, and then when adding to remote peer we call “pc.addTrack(track, stream)” and when ontrack we can’t detect the stream id which indicates the actual kind of the stream

Well after a while I started implementing a web version of the app, so I found the implementation is different, the web implementation of the protocol doesn’t allow changing the stream id because its read only, but in their implementation I can detect from the label.

So I’m just curious why we don’t support labels in react-native-webrtc.

The signaling solution doesn’t look like a good idea because it opens up cases where I received a track before the signaling server notifies me and we lose the SSOT