react-native-twilio-video-webrtc icon indicating copy to clipboard operation
react-native-twilio-video-webrtc copied to clipboard

Expose Data Track ID on DataTrack Message Received

Open marcato15 opened this issue 4 years ago • 2 comments

Would it be possible to expose the data track ID that a data track message is received on? We want to use it to identify the sender of the message instead of sending it in the message body as one layer of enforcing permissions. We would then subscribe when data tracks are published and keep track of all the data track id's for a specific identity.

marcato15 avatar Feb 25 '21 17:02 marcato15

This isn't currently supported but should be a fairly simple change. We build the track event here:

https://github.com/blackuy/react-native-twilio-video-webrtc/blob/master/android/src/main/java/com/twiliorn/library/CustomTwilioVideoView.java#L1170

And so in principle could just add the track ID to the payload there.

slycoder avatar Feb 28 '21 20:02 slycoder

Hi @slycoder, the following PR should address this change: https://github.com/blackuy/react-native-twilio-video-webrtc/pull/470

andybar2 avatar Mar 31 '21 15:03 andybar2