mirror of
https://gitlab.com/comunic/ComunicRTCProxy
synced 2024-12-25 13:08:54 +00:00
Fix a issue with Google Chrome
This commit is contained in:
parent
ea73efb0b0
commit
3c69839fa8
9
relay.go
9
relay.go
@ -255,7 +255,14 @@ func newCall(mainOffer receivedSignal, r activeRelay) {
|
||||
}()
|
||||
|
||||
// Create a local track, all our SFU clients will be fed via this track
|
||||
localTrack, newTrackErr := mainPeerConnection.NewTrack(remoteTrack.PayloadType(), remoteTrack.SSRC(), remoteTrack.ID(), remoteTrack.Label())
|
||||
trackID := "audio"
|
||||
trackLabel := "pion" // We need only one track label
|
||||
if remoteTrack.Kind() == webrtc.RTPCodecTypeVideo {
|
||||
trackID = "video" // We need two different track ids
|
||||
}
|
||||
|
||||
localTrack, newTrackErr := mainPeerConnection.NewTrack(remoteTrack.PayloadType(), remoteTrack.SSRC(), trackID, trackLabel)
|
||||
|
||||
if newTrackErr != nil {
|
||||
log.Println("New track error!", err)
|
||||
askForClose(r)
|
||||
|
Loading…
Reference in New Issue
Block a user