Commit d236f4c6 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Work around empty track id and msid.

parent 5ad02442
......@@ -361,9 +361,25 @@ func addDownTrackUnlocked(conn *rtpDownConnection, remoteTrack *rtpUpTrack, remo
}
}
id := remoteTrack.track.ID()
if id == "" {
log.Println("Got track with empty id")
id = remoteTrack.track.RID()
}
if id == "" {
id = remoteTrack.track.Kind().String()
}
msid := remoteTrack.track.StreamID()
if msid == "" {
log.Println("Got track with empty msid")
msid = remoteConn.Label()
}
if msid == "" {
msid = "dummy"
}
local, err := webrtc.NewTrackLocalStaticRTP(
remoteTrack.Codec(),
remoteTrack.track.ID(), remoteTrack.track.StreamID(),
remoteTrack.Codec(), id, msid,
)
if err != nil {
return err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment