Skip to content

Adding audio track to PeerConnection #1244

Answered by paullouisageneau
yrucrem asked this question in Q&A
Discussion options

You must be logged in to vote

Is there anything special I need to do on the tracks media handlers when I want to send data in both directions? You made me aware, that I need to add the Opus RTP packetizer via setMediaHandler(), Is this also necessary when receiving the track in the onTrack() callback (with a new rtpConfig containing the other SSRC)?

Yes indeed, if you send the same format in both directions, you need to set up the track the same way in onTrack().

In the media-receiver example I see that the added media handler is a RtcpReceivingSession and I am not sure how to set both handlers.

If I am not mistaken there is no example where a media track is used both for sending and receiving, could you maybe prov…

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@yrucrem
Comment options

@paullouisageneau
Comment options

@yrucrem
Comment options

@paullouisageneau
Comment options

Answer selected by yrucrem
@yrucrem
Comment options

@yrucrem
Comment options

@paullouisageneau
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants