Handle TrackInfo.Source attribute (#146)

* Support passing along Source attribute
This commit is contained in:
David Zhao
2021-10-14 13:10:57 -07:00
committed by GitHub
parent d08646f17e
commit eba0c23375
4 changed files with 13 additions and 13 deletions
+9 -8
View File
@@ -2,8 +2,8 @@ package rtc
import (
"fmt"
"strings"
"io"
"strings"
"sync"
"sync/atomic"
"time"
@@ -337,13 +337,14 @@ func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest) {
}
ti := &livekit.TrackInfo{
Type: req.Type,
Name: req.Name,
Sid: utils.NewGuid(utils.TrackPrefix),
Width: req.Width,
Height: req.Height,
Muted: req.Muted,
Type: req.Type,
Name: req.Name,
Sid: utils.NewGuid(utils.TrackPrefix),
Width: req.Width,
Height: req.Height,
Muted: req.Muted,
DisableDtx: req.DisableDtx,
Source: req.Source,
}
p.pendingTracks[req.Cid] = ti
@@ -1150,7 +1151,7 @@ func (p *ParticipantImpl) configureReceiverDTX() {
if receiverCodec.MimeType == webrtc.MimeTypeOpus {
fmtpUseDTX := "usedtx=1"
// remove occurrence in the middle
sdpFmtpLine := strings.ReplaceAll(receiverCodec.SDPFmtpLine, fmtpUseDTX + ";", "")
sdpFmtpLine := strings.ReplaceAll(receiverCodec.SDPFmtpLine, fmtpUseDTX+";", "")
// remove occurrence at the end
sdpFmtpLine = strings.ReplaceAll(sdpFmtpLine, fmtpUseDTX, "")
if enableDTX {
+1 -2
View File
@@ -1,8 +1,7 @@
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
//+build !wireinject
package service