mirror of
				https://gitlab.com/comunic/ComunicRTCProxy
				synced 2025-11-04 04:04:19 +00:00 
			
		
		
		
	Fix a issue with Google Chrome
This commit is contained in:
		
							
								
								
									
										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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user