Handle TrackInfo.Source attribute (#146)
* Support passing along Source attribute
This commit is contained in:
@@ -14,7 +14,7 @@ require (
|
|||||||
github.com/google/wire v0.5.0
|
github.com/google/wire v0.5.0
|
||||||
github.com/gorilla/websocket v1.4.2
|
github.com/gorilla/websocket v1.4.2
|
||||||
github.com/jxskiss/base62 v0.0.0-20191017122030-4f11678b909b
|
github.com/jxskiss/base62 v0.0.0-20191017122030-4f11678b909b
|
||||||
github.com/livekit/protocol v0.9.8
|
github.com/livekit/protocol v0.9.9
|
||||||
github.com/magefile/mage v1.11.0
|
github.com/magefile/mage v1.11.0
|
||||||
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0
|
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0
|
||||||
github.com/mitchellh/go-homedir v1.1.0
|
github.com/mitchellh/go-homedir v1.1.0
|
||||||
|
|||||||
@@ -246,8 +246,8 @@ github.com/lithammer/shortuuid/v3 v3.0.6 h1:pr15YQyvhiSX/qPxncFtqk+v4xLEpOZObbsY
|
|||||||
github.com/lithammer/shortuuid/v3 v3.0.6/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts=
|
github.com/lithammer/shortuuid/v3 v3.0.6/go.mod h1:vMk8ke37EmiewwolSO1NLW8vP4ZaKlRuDIi8tWWmAts=
|
||||||
github.com/livekit/ion-sfu v1.20.12 h1:9u7KzTWvUgNUbPRaYDXxWHchuc7MuNGlRqGu9OAkqj4=
|
github.com/livekit/ion-sfu v1.20.12 h1:9u7KzTWvUgNUbPRaYDXxWHchuc7MuNGlRqGu9OAkqj4=
|
||||||
github.com/livekit/ion-sfu v1.20.12/go.mod h1:IVcCb8yMl5qHq+8InP5v9HgrjgnPZny8GhFS86YOtug=
|
github.com/livekit/ion-sfu v1.20.12/go.mod h1:IVcCb8yMl5qHq+8InP5v9HgrjgnPZny8GhFS86YOtug=
|
||||||
github.com/livekit/protocol v0.9.8 h1:FJEUTyXTa8Q0+EaKwyL8XAeNgW4xQRKzik00DJgwJhg=
|
github.com/livekit/protocol v0.9.9 h1:PP+86MnRBwlu40lTiGNkZu2CrHiW7P12VOi2nIOoU98=
|
||||||
github.com/livekit/protocol v0.9.8/go.mod h1:MEKn847Iu/2U8ClZyUmEm2oHn8k9fnSHy81Wv8kkSDo=
|
github.com/livekit/protocol v0.9.9/go.mod h1:MEKn847Iu/2U8ClZyUmEm2oHn8k9fnSHy81Wv8kkSDo=
|
||||||
github.com/lucsky/cuid v1.0.2 h1:z4XlExeoderxoPj2/dxKOyPxe9RCOu7yNq9/XWxIUMQ=
|
github.com/lucsky/cuid v1.0.2 h1:z4XlExeoderxoPj2/dxKOyPxe9RCOu7yNq9/XWxIUMQ=
|
||||||
github.com/lucsky/cuid v1.0.2/go.mod h1:QaaJqckboimOmhRSJXSx/+IT+VTfxfPGSo/6mfgUfmE=
|
github.com/lucsky/cuid v1.0.2/go.mod h1:QaaJqckboimOmhRSJXSx/+IT+VTfxfPGSo/6mfgUfmE=
|
||||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package rtc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
"io"
|
"io"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
@@ -337,13 +337,14 @@ func (p *ParticipantImpl) AddTrack(req *livekit.AddTrackRequest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ti := &livekit.TrackInfo{
|
ti := &livekit.TrackInfo{
|
||||||
Type: req.Type,
|
Type: req.Type,
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
Sid: utils.NewGuid(utils.TrackPrefix),
|
Sid: utils.NewGuid(utils.TrackPrefix),
|
||||||
Width: req.Width,
|
Width: req.Width,
|
||||||
Height: req.Height,
|
Height: req.Height,
|
||||||
Muted: req.Muted,
|
Muted: req.Muted,
|
||||||
DisableDtx: req.DisableDtx,
|
DisableDtx: req.DisableDtx,
|
||||||
|
Source: req.Source,
|
||||||
}
|
}
|
||||||
p.pendingTracks[req.Cid] = ti
|
p.pendingTracks[req.Cid] = ti
|
||||||
|
|
||||||
@@ -1150,7 +1151,7 @@ func (p *ParticipantImpl) configureReceiverDTX() {
|
|||||||
if receiverCodec.MimeType == webrtc.MimeTypeOpus {
|
if receiverCodec.MimeType == webrtc.MimeTypeOpus {
|
||||||
fmtpUseDTX := "usedtx=1"
|
fmtpUseDTX := "usedtx=1"
|
||||||
// remove occurrence in the middle
|
// remove occurrence in the middle
|
||||||
sdpFmtpLine := strings.ReplaceAll(receiverCodec.SDPFmtpLine, fmtpUseDTX + ";", "")
|
sdpFmtpLine := strings.ReplaceAll(receiverCodec.SDPFmtpLine, fmtpUseDTX+";", "")
|
||||||
// remove occurrence at the end
|
// remove occurrence at the end
|
||||||
sdpFmtpLine = strings.ReplaceAll(sdpFmtpLine, fmtpUseDTX, "")
|
sdpFmtpLine = strings.ReplaceAll(sdpFmtpLine, fmtpUseDTX, "")
|
||||||
if enableDTX {
|
if enableDTX {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
// Code generated by Wire. DO NOT EDIT.
|
// Code generated by Wire. DO NOT EDIT.
|
||||||
|
|
||||||
//go:generate go run github.com/google/wire/cmd/wire
|
//go:generate go run github.com/google/wire/cmd/wire
|
||||||
//go:build !wireinject
|
//+build !wireinject
|
||||||
// +build !wireinject
|
|
||||||
|
|
||||||
package service
|
package service
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user