LePhenix47 / Lahouiti_Younes_P13_21062024

This repo contains the code for the a Proof of Concept (PoC) for the "Your car your way" app for the support page using WebSockets for the chat and WebRTC for the videoconference
MIT License
1 stars 0 forks source link

BUGS to solve #5

Open LePhenix47 opened 3 months ago

LePhenix47 commented 3 months ago

BUGS to fix

There are currently 6 major bugs in the proof of concept:

LePhenix47 commented 2 months ago

UNSOLVABLE BUG

If a room creator shares ONLY one media (audio or video) and the joiner shares ONLY the opposite, the room creator won't receive any tracks

It's an SDP issue, if the offerer shares one specific media stream, the answerer one or both, then the offerer will get either none or one in common to the one shared by the answerer

LePhenix47 commented 2 months ago

Update reguarding the "unsolvable bug"

UNSOLVABLE BUG

If a room creator shares ONLY one media (audio or video) and the joiner shares ONLY the opposite, the room creator won't receive any tracks

It's an SDP issue, if the offerer shares one specific media stream, the answerer one or both, then the offerer will get either none or one in common to the one shared by the answerer

This is actually NOT an unsolvable bug. We can address this issue by implementing a more robust handling of media streams. Specifically, we can introduce transceivers in the peer connection setup to ensure that the correct media flow is established, regardless of the specific streams shared by the offerer and answerer, example:

// Create a new RTCPeerConnection
const peerConnection = new RTCPeerConnection(configuration);

const audioTransceiver: RTCRtpTransceiver = peerConnection.addTransceiver('audio', { direction: 'sendrecv' });
const videoTransceiver: RTCRtpTransceiver = peerConnection.addTransceiver('video', { direction: 'sendrecv' });

By making these adjustments, we can guarantee that the room creator will receive the appropriate tracks, even in cases where there is a mismatch in shared media types. I believe this approach will resolve the issue effectively.

LePhenix47 commented 2 months ago

IMPORTANT NOTE:

Regarding the screen recording, we must mix the audio data together using the AudioContext API