-
Lines 269 to 274 in 7948437 writeErrs := []error{}
+ packets[0].SetExtension(123,[]byte("My header extention")) // Add rtp header extension on first frame's packet
for _, p := range packets {
if err := s.rtpTrack.WriteRTP(p); err != nil {
writeErrs = append(writeErrs, err)
}
} And if there is no easy way, will you accept PR to add this ability ? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
at-wat
Jun 22, 2021
Replies: 2 comments
-
Hi @amotzte ! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Sean-Der
-
Hi @at-wat |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @amotzte !
TrackLocal
is an interface, so you can implement a customTrackLocal
(in this case,webrtc.TrackLocalStaticSample
+ your patch) in your package and pass it toPeerConnection.AddTrack()
orPeerConnection.AddTransceiverFromTrack()
.