Replies: 1 comment
-
There is no concept of what tracks a side has, this is just a negotiation process and it's entirely up to the application. One side has to offer the tracks setup it wants, and the answering side has to accept or reject it, irrelevant of the actual data flow direction. Here the example wants to receive a single track, and it wants it to be h264 and not another codec, so that's what it offers.
The t->onOpen([mid, t]() {
[...]
}); |
Beta Was this translation helpful? Give feedback.
-
I've seen another question about recording(https://github.com/paullouisageneau/libdatachannel/discussions/712) and read datachannel-media-receiver example, But still need help。
I cannot understand why the Client needs to create a (rtc::Description::Direction::RecvOnly) track by itself:
Because I don't know how many audio and video streams the other side has. My understanding is to get how many tracks there are in the PeerConnectionton onTrack event (my code is below. ), but in addition to receiving the ontrack event, the onMessage event of the track was not triggered.
Now I want to know whether this library can realize the requirement of recording RTP packets. If so, can you tell me how to obtain the RTP packets, thank you so much~
my PeerConnection track code is :
Beta Was this translation helpful? Give feedback.
All reactions