mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 13:25:42 +00:00
Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack. (#2684)
* Handle UpdateLocalAudioTrack and UpdateLocalVideoTrack. - Update the TrackInfo - NOTE: populating Stereo and DisableDtx fields although there are features now. - The audio features in UpdateLocalAudioTrack is applied as is, i. e. the update has the latest set of features. - Emits a track update which will broadcast a participant update. TODO: ----- - Telemetry event with track update? * update deps
This commit is contained in:
27
go.mod
27
go.mod
@@ -20,7 +20,7 @@ require (
|
||||
github.com/jxskiss/base62 v1.1.0
|
||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240416023643-881d3dc5423e
|
||||
github.com/livekit/protocol v1.12.1-0.20240420195247-e418881086ea
|
||||
github.com/livekit/protocol v1.12.1-0.20240426044238-2d50a792225e
|
||||
github.com/livekit/psrpc v0.5.3-0.20240403150641-811331b106d9
|
||||
github.com/mackerelio/go-osstat v0.2.4
|
||||
github.com/magefile/mage v1.15.0
|
||||
@@ -49,8 +49,8 @@ require (
|
||||
github.com/urfave/negroni/v3 v3.1.0
|
||||
go.uber.org/atomic v1.11.0
|
||||
go.uber.org/zap v1.27.0
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
|
||||
golang.org/x/sync v0.6.0
|
||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
|
||||
golang.org/x/sync v0.7.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
@@ -58,7 +58,7 @@ require (
|
||||
require (
|
||||
github.com/benbjohnson/clock v1.3.5 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
@@ -67,7 +67,6 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/google/subcommands v1.2.0 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
@@ -75,13 +74,13 @@ require (
|
||||
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.4 // indirect
|
||||
github.com/josharian/native v1.1.0 // indirect
|
||||
github.com/klauspost/compress v1.17.7 // indirect
|
||||
github.com/klauspost/compress v1.17.8 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
|
||||
github.com/lithammer/shortuuid/v4 v4.0.0 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/mdlayher/netlink v1.7.1 // indirect
|
||||
github.com/mdlayher/socket v0.4.0 // indirect
|
||||
github.com/nats-io/nats.go v1.34.0 // indirect
|
||||
github.com/nats-io/nats.go v1.34.1 // indirect
|
||||
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/pion/datachannel v1.5.5 // indirect
|
||||
@@ -100,13 +99,13 @@ require (
|
||||
github.com/zeebo/xxh3 v1.0.2 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.uber.org/zap/exp v0.2.0 // indirect
|
||||
golang.org/x/crypto v0.21.0 // indirect
|
||||
golang.org/x/mod v0.16.0 // indirect
|
||||
golang.org/x/net v0.23.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/crypto v0.22.0 // indirect
|
||||
golang.org/x/mod v0.17.0 // indirect
|
||||
golang.org/x/net v0.24.0 // indirect
|
||||
golang.org/x/sys v0.19.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/tools v0.19.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
|
||||
google.golang.org/grpc v1.62.1 // indirect
|
||||
golang.org/x/tools v0.20.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
|
||||
google.golang.org/grpc v1.63.2 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
)
|
||||
|
||||
53
go.sum
53
go.sum
@@ -10,8 +10,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
|
||||
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
|
||||
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs=
|
||||
github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA=
|
||||
github.com/cilium/ebpf v0.8.1 h1:bLSSEbBLqGPXxls55pGr5qWZaTqcmfDJHhou7t254ao=
|
||||
@@ -50,8 +50,6 @@ github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7
|
||||
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
@@ -103,8 +101,8 @@ github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 h1:N527AHMa79
|
||||
github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786/go.mod h1:v4hqbTdfQngbVSZJVWUhGE/lbTFf9jb+ygmNUDQMuOs=
|
||||
github.com/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw=
|
||||
github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc=
|
||||
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
|
||||
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
|
||||
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
|
||||
github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=
|
||||
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
@@ -122,8 +120,8 @@ github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkD
|
||||
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240416023643-881d3dc5423e h1:ss4VwrouYiDpuNJ9BUTH+WsW+GDdJS70iZp8ii3/0Lc=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20240416023643-881d3dc5423e/go.mod h1:jwKUCmObuiEDH0iiuJHaGMXwRs3RjrB4G6qqgkr/5oE=
|
||||
github.com/livekit/protocol v1.12.1-0.20240420195247-e418881086ea h1:eXYVST3KMoIedAAub79A78K1B4qAV6visG/1aoG1LCI=
|
||||
github.com/livekit/protocol v1.12.1-0.20240420195247-e418881086ea/go.mod h1:jB6PWwf4tdMAwy+jxexqaVWuQiiklAtO4F5zZzWkTII=
|
||||
github.com/livekit/protocol v1.12.1-0.20240426044238-2d50a792225e h1:hepBKU/dTHNLLxq+Sc9Z8DdNLi3rjcQ6VlL3CEf9NmE=
|
||||
github.com/livekit/protocol v1.12.1-0.20240426044238-2d50a792225e/go.mod h1:pnn0Dv+/0K0OFqKHX6J6SreYO1dZxl6tDuAZ1ns8L/w=
|
||||
github.com/livekit/psrpc v0.5.3-0.20240403150641-811331b106d9 h1:4CngtPIJ58WcQ1sUDGdxJDkTndQpN6M/T8jXvRAd7Oc=
|
||||
github.com/livekit/psrpc v0.5.3-0.20240403150641-811331b106d9/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
|
||||
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
|
||||
@@ -155,8 +153,8 @@ github.com/mdlayher/socket v0.4.0 h1:280wsy40IC9M9q1uPGcLBwXpcTQDtoGwVt+BNoITxIw
|
||||
github.com/mdlayher/socket v0.4.0/go.mod h1:xxFqz5GRCUN3UEOm9CZqEJsAbe1C8OwSK46NlmWuVoc=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/nats-io/nats.go v1.34.0 h1:fnxnPCNiwIG5w08rlMcEKTUw4AV/nKyGCOJE8TdhSPk=
|
||||
github.com/nats-io/nats.go v1.34.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||
github.com/nats-io/nats.go v1.34.1 h1:syWey5xaNHZgicYBemv0nohUPPmaLteiBEUT6Q5+F/4=
|
||||
github.com/nats-io/nats.go v1.34.1/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
||||
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||
@@ -285,16 +283,16 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
|
||||
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw=
|
||||
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ=
|
||||
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
|
||||
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
|
||||
golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -319,15 +317,16 @@ golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
|
||||
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
|
||||
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -365,8 +364,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
@@ -396,15 +395,15 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
|
||||
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
|
||||
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
|
||||
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
|
||||
golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY=
|
||||
golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
|
||||
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
|
||||
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
|
||||
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
|
||||
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
||||
@@ -649,7 +649,7 @@ func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) {
|
||||
break
|
||||
}
|
||||
|
||||
// for client don't use simulcast codecs (old client version or single codec)
|
||||
// for clients that don't use simulcast codecs (old client version or single codec)
|
||||
if i == 0 {
|
||||
clonedInfo.Layers = ci.Layers
|
||||
}
|
||||
@@ -667,6 +667,41 @@ func (t *MediaTrackReceiver) UpdateTrackInfo(ti *livekit.TrackInfo) {
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) {
|
||||
if t.Kind() != livekit.TrackType_AUDIO {
|
||||
return
|
||||
}
|
||||
|
||||
t.lock.Lock()
|
||||
t.trackInfo.AudioFeatures = update.Features
|
||||
t.trackInfo.Stereo = false
|
||||
t.trackInfo.DisableDtx = false
|
||||
for _, feature := range update.Features {
|
||||
switch feature {
|
||||
case livekit.AudioTrackFeature_TF_STEREO:
|
||||
t.trackInfo.Stereo = true
|
||||
case livekit.AudioTrackFeature_TF_NO_DTX:
|
||||
t.trackInfo.DisableDtx = true
|
||||
}
|
||||
}
|
||||
t.lock.Unlock()
|
||||
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) {
|
||||
if t.Kind() != livekit.TrackType_VIDEO {
|
||||
return
|
||||
}
|
||||
|
||||
t.lock.Lock()
|
||||
t.trackInfo.Width = update.Width
|
||||
t.trackInfo.Height = update.Height
|
||||
t.lock.Unlock()
|
||||
|
||||
t.updateTrackInfoOfReceivers()
|
||||
}
|
||||
|
||||
func (t *MediaTrackReceiver) UpdateVideoLayers(layers []*livekit.VideoLayer) {
|
||||
t.lock.Lock()
|
||||
// set video layer ssrc info
|
||||
|
||||
@@ -1816,6 +1816,12 @@ func (p *ParticipantImpl) addPendingTrackLocked(req *livekit.AddTrackRequest) *l
|
||||
Encryption: req.Encryption,
|
||||
Stream: req.Stream,
|
||||
}
|
||||
if req.Stereo {
|
||||
ti.AudioFeatures = append(ti.AudioFeatures, livekit.AudioTrackFeature_TF_STEREO)
|
||||
}
|
||||
if req.DisableDtx {
|
||||
ti.AudioFeatures = append(ti.AudioFeatures, livekit.AudioTrackFeature_TF_NO_DTX)
|
||||
}
|
||||
if ti.Stream == "" {
|
||||
ti.Stream = StreamFromTrackSource(ti.Source)
|
||||
}
|
||||
|
||||
@@ -27,8 +27,10 @@ func HandleParticipantSignal(room types.Room, participant types.LocalParticipant
|
||||
switch msg := req.GetMessage().(type) {
|
||||
case *livekit.SignalRequest_Offer:
|
||||
participant.HandleOffer(FromProtoSessionDescription(msg.Offer))
|
||||
|
||||
case *livekit.SignalRequest_Answer:
|
||||
participant.HandleAnswer(FromProtoSessionDescription(msg.Answer))
|
||||
|
||||
case *livekit.SignalRequest_Trickle:
|
||||
candidateInit, err := FromProtoTrickle(msg.Trickle)
|
||||
if err != nil {
|
||||
@@ -36,11 +38,14 @@ func HandleParticipantSignal(room types.Room, participant types.LocalParticipant
|
||||
return nil
|
||||
}
|
||||
participant.AddICECandidate(candidateInit, msg.Trickle.Target)
|
||||
|
||||
case *livekit.SignalRequest_AddTrack:
|
||||
pLogger.Debugw("add track request", "trackID", msg.AddTrack.Cid)
|
||||
participant.AddTrack(msg.AddTrack)
|
||||
|
||||
case *livekit.SignalRequest_Mute:
|
||||
participant.SetTrackMuted(livekit.TrackID(msg.Mute.Sid), msg.Mute.Muted, false)
|
||||
|
||||
case *livekit.SignalRequest_Subscription:
|
||||
// allow participant to indicate their interest in the subscription
|
||||
// permission check happens later in SubscriptionManager
|
||||
@@ -50,25 +55,30 @@ func HandleParticipantSignal(room types.Room, participant types.LocalParticipant
|
||||
msg.Subscription.ParticipantTracks,
|
||||
msg.Subscription.Subscribe,
|
||||
)
|
||||
|
||||
case *livekit.SignalRequest_TrackSetting:
|
||||
for _, sid := range livekit.StringsAsIDs[livekit.TrackID](msg.TrackSetting.TrackSids) {
|
||||
participant.UpdateSubscribedTrackSettings(sid, msg.TrackSetting)
|
||||
}
|
||||
|
||||
case *livekit.SignalRequest_Leave:
|
||||
pLogger.Debugw("client leaving room")
|
||||
room.RemoveParticipant(participant.Identity(), participant.ID(), types.ParticipantCloseReasonClientRequestLeave)
|
||||
|
||||
case *livekit.SignalRequest_SubscriptionPermission:
|
||||
err := room.UpdateSubscriptionPermission(participant, msg.SubscriptionPermission)
|
||||
if err != nil {
|
||||
pLogger.Warnw("could not update subscription permission", err,
|
||||
"permissions", msg.SubscriptionPermission)
|
||||
}
|
||||
|
||||
case *livekit.SignalRequest_SyncState:
|
||||
err := room.SyncState(participant, msg.SyncState)
|
||||
if err != nil {
|
||||
pLogger.Warnw("could not sync state", err,
|
||||
"state", msg.SyncState)
|
||||
}
|
||||
|
||||
case *livekit.SignalRequest_Simulate:
|
||||
err := room.SimulateScenario(participant, msg.Simulate)
|
||||
if err != nil {
|
||||
@@ -85,6 +95,17 @@ func HandleParticipantSignal(room types.Room, participant types.LocalParticipant
|
||||
if participant.ClaimGrants().Video.GetCanUpdateOwnMetadata() {
|
||||
room.UpdateParticipantMetadata(participant, msg.UpdateMetadata.Name, msg.UpdateMetadata.Metadata)
|
||||
}
|
||||
|
||||
case *livekit.SignalRequest_UpdateAudioTrack:
|
||||
if err := participant.UpdateAudioTrack(msg.UpdateAudioTrack); err != nil {
|
||||
pLogger.Warnw("could not update audio track", err, "update", msg.UpdateAudioTrack)
|
||||
}
|
||||
|
||||
case *livekit.SignalRequest_UpdateVideoTrack:
|
||||
if err := participant.UpdateVideoTrack(msg.UpdateVideoTrack); err != nil {
|
||||
pLogger.Warnw("could not update video track", err, "update", msg.UpdateVideoTrack)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -280,6 +280,8 @@ type Participant interface {
|
||||
resolverBySid func(participantID livekit.ParticipantID) LocalParticipant,
|
||||
) error
|
||||
UpdateVideoLayers(updateVideoLayers *livekit.UpdateVideoLayers) error
|
||||
UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) error
|
||||
UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) error
|
||||
|
||||
DebugInfo() map[string]interface{}
|
||||
}
|
||||
@@ -451,6 +453,8 @@ type MediaTrack interface {
|
||||
Stream() string
|
||||
|
||||
UpdateTrackInfo(ti *livekit.TrackInfo)
|
||||
UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack)
|
||||
UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack)
|
||||
ToProto() *livekit.TrackInfo
|
||||
|
||||
PublisherID() livekit.ParticipantID
|
||||
|
||||
@@ -332,6 +332,11 @@ type FakeLocalMediaTrack struct {
|
||||
toProtoReturnsOnCall map[int]struct {
|
||||
result1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateAudioTrackStub func(*livekit.UpdateLocalAudioTrack)
|
||||
updateAudioTrackMutex sync.RWMutex
|
||||
updateAudioTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}
|
||||
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||
updateTrackInfoMutex sync.RWMutex
|
||||
updateTrackInfoArgsForCall []struct {
|
||||
@@ -342,6 +347,11 @@ type FakeLocalMediaTrack struct {
|
||||
updateVideoLayersArgsForCall []struct {
|
||||
arg1 []*livekit.VideoLayer
|
||||
}
|
||||
UpdateVideoTrackStub func(*livekit.UpdateLocalVideoTrack)
|
||||
updateVideoTrackMutex sync.RWMutex
|
||||
updateVideoTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}
|
||||
invocations map[string][][]interface{}
|
||||
invocationsMutex sync.RWMutex
|
||||
}
|
||||
@@ -2077,6 +2087,38 @@ func (fake *FakeLocalMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.Tr
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateAudioTrack(arg1 *livekit.UpdateLocalAudioTrack) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
fake.updateAudioTrackArgsForCall = append(fake.updateAudioTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateAudioTrackStub
|
||||
fake.recordInvocation("UpdateAudioTrack", []interface{}{arg1})
|
||||
fake.updateAudioTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateAudioTrackStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateAudioTrackCallCount() int {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
return len(fake.updateAudioTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateAudioTrackCalls(stub func(*livekit.UpdateLocalAudioTrack)) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateAudioTrackArgsForCall(i int) *livekit.UpdateLocalAudioTrack {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateAudioTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateTrackInfo(arg1 *livekit.TrackInfo) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
fake.updateTrackInfoArgsForCall = append(fake.updateTrackInfoArgsForCall, struct {
|
||||
@@ -2146,6 +2188,38 @@ func (fake *FakeLocalMediaTrack) UpdateVideoLayersArgsForCall(i int) []*livekit.
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateVideoTrack(arg1 *livekit.UpdateLocalVideoTrack) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
fake.updateVideoTrackArgsForCall = append(fake.updateVideoTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateVideoTrackStub
|
||||
fake.recordInvocation("UpdateVideoTrack", []interface{}{arg1})
|
||||
fake.updateVideoTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateVideoTrackStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateVideoTrackCallCount() int {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
return len(fake.updateVideoTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateVideoTrackCalls(stub func(*livekit.UpdateLocalVideoTrack)) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) UpdateVideoTrackArgsForCall(i int) *livekit.UpdateLocalVideoTrack {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateVideoTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalMediaTrack) Invocations() map[string][][]interface{} {
|
||||
fake.invocationsMutex.RLock()
|
||||
defer fake.invocationsMutex.RUnlock()
|
||||
@@ -2219,10 +2293,14 @@ func (fake *FakeLocalMediaTrack) Invocations() map[string][][]interface{} {
|
||||
defer fake.streamMutex.RUnlock()
|
||||
fake.toProtoMutex.RLock()
|
||||
defer fake.toProtoMutex.RUnlock()
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
copiedInvocations := map[string][][]interface{}{}
|
||||
for key, value := range fake.invocations {
|
||||
copiedInvocations[key] = value
|
||||
|
||||
@@ -916,6 +916,17 @@ type FakeLocalParticipant struct {
|
||||
unsubscribeFromTrackArgsForCall []struct {
|
||||
arg1 livekit.TrackID
|
||||
}
|
||||
UpdateAudioTrackStub func(*livekit.UpdateLocalAudioTrack) error
|
||||
updateAudioTrackMutex sync.RWMutex
|
||||
updateAudioTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}
|
||||
updateAudioTrackReturns struct {
|
||||
result1 error
|
||||
}
|
||||
updateAudioTrackReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
UpdateLastSeenSignalStub func()
|
||||
updateLastSeenSignalMutex sync.RWMutex
|
||||
updateLastSeenSignalArgsForCall []struct {
|
||||
@@ -986,6 +997,17 @@ type FakeLocalParticipant struct {
|
||||
updateVideoLayersReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
UpdateVideoTrackStub func(*livekit.UpdateLocalVideoTrack) error
|
||||
updateVideoTrackMutex sync.RWMutex
|
||||
updateVideoTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}
|
||||
updateVideoTrackReturns struct {
|
||||
result1 error
|
||||
}
|
||||
updateVideoTrackReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
VerifySubscribeParticipantInfoStub func(livekit.ParticipantID, uint32)
|
||||
verifySubscribeParticipantInfoMutex sync.RWMutex
|
||||
verifySubscribeParticipantInfoArgsForCall []struct {
|
||||
@@ -5902,6 +5924,67 @@ func (fake *FakeLocalParticipant) UnsubscribeFromTrackArgsForCall(i int) livekit
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrack(arg1 *livekit.UpdateLocalAudioTrack) error {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
ret, specificReturn := fake.updateAudioTrackReturnsOnCall[len(fake.updateAudioTrackArgsForCall)]
|
||||
fake.updateAudioTrackArgsForCall = append(fake.updateAudioTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateAudioTrackStub
|
||||
fakeReturns := fake.updateAudioTrackReturns
|
||||
fake.recordInvocation("UpdateAudioTrack", []interface{}{arg1})
|
||||
fake.updateAudioTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
if specificReturn {
|
||||
return ret.result1
|
||||
}
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrackCallCount() int {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
return len(fake.updateAudioTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrackCalls(stub func(*livekit.UpdateLocalAudioTrack) error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrackArgsForCall(i int) *livekit.UpdateLocalAudioTrack {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateAudioTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrackReturns(result1 error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = nil
|
||||
fake.updateAudioTrackReturns = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateAudioTrackReturnsOnCall(i int, result1 error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = nil
|
||||
if fake.updateAudioTrackReturnsOnCall == nil {
|
||||
fake.updateAudioTrackReturnsOnCall = make(map[int]struct {
|
||||
result1 error
|
||||
})
|
||||
}
|
||||
fake.updateAudioTrackReturnsOnCall[i] = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateLastSeenSignal() {
|
||||
fake.updateLastSeenSignalMutex.Lock()
|
||||
fake.updateLastSeenSignalArgsForCall = append(fake.updateLastSeenSignalArgsForCall, struct {
|
||||
@@ -6278,6 +6361,67 @@ func (fake *FakeLocalParticipant) UpdateVideoLayersReturnsOnCall(i int, result1
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrack(arg1 *livekit.UpdateLocalVideoTrack) error {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
ret, specificReturn := fake.updateVideoTrackReturnsOnCall[len(fake.updateVideoTrackArgsForCall)]
|
||||
fake.updateVideoTrackArgsForCall = append(fake.updateVideoTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateVideoTrackStub
|
||||
fakeReturns := fake.updateVideoTrackReturns
|
||||
fake.recordInvocation("UpdateVideoTrack", []interface{}{arg1})
|
||||
fake.updateVideoTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
if specificReturn {
|
||||
return ret.result1
|
||||
}
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrackCallCount() int {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
return len(fake.updateVideoTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrackCalls(stub func(*livekit.UpdateLocalVideoTrack) error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrackArgsForCall(i int) *livekit.UpdateLocalVideoTrack {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateVideoTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrackReturns(result1 error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = nil
|
||||
fake.updateVideoTrackReturns = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) UpdateVideoTrackReturnsOnCall(i int, result1 error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = nil
|
||||
if fake.updateVideoTrackReturnsOnCall == nil {
|
||||
fake.updateVideoTrackReturnsOnCall = make(map[int]struct {
|
||||
result1 error
|
||||
})
|
||||
}
|
||||
fake.updateVideoTrackReturnsOnCall[i] = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeLocalParticipant) VerifySubscribeParticipantInfo(arg1 livekit.ParticipantID, arg2 uint32) {
|
||||
fake.verifySubscribeParticipantInfoMutex.Lock()
|
||||
fake.verifySubscribeParticipantInfoArgsForCall = append(fake.verifySubscribeParticipantInfoArgsForCall, struct {
|
||||
@@ -6647,6 +6791,8 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} {
|
||||
defer fake.uncacheDownTrackMutex.RUnlock()
|
||||
fake.unsubscribeFromTrackMutex.RLock()
|
||||
defer fake.unsubscribeFromTrackMutex.RUnlock()
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
fake.updateLastSeenSignalMutex.RLock()
|
||||
defer fake.updateLastSeenSignalMutex.RUnlock()
|
||||
fake.updateMediaLossMutex.RLock()
|
||||
@@ -6663,6 +6809,8 @@ func (fake *FakeLocalParticipant) Invocations() map[string][][]interface{} {
|
||||
defer fake.updateSubscriptionPermissionMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
fake.verifySubscribeParticipantInfoMutex.RLock()
|
||||
defer fake.verifySubscribeParticipantInfoMutex.RUnlock()
|
||||
fake.waitUntilSubscribedMutex.RLock()
|
||||
|
||||
@@ -268,6 +268,11 @@ type FakeMediaTrack struct {
|
||||
toProtoReturnsOnCall map[int]struct {
|
||||
result1 *livekit.TrackInfo
|
||||
}
|
||||
UpdateAudioTrackStub func(*livekit.UpdateLocalAudioTrack)
|
||||
updateAudioTrackMutex sync.RWMutex
|
||||
updateAudioTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}
|
||||
UpdateTrackInfoStub func(*livekit.TrackInfo)
|
||||
updateTrackInfoMutex sync.RWMutex
|
||||
updateTrackInfoArgsForCall []struct {
|
||||
@@ -278,6 +283,11 @@ type FakeMediaTrack struct {
|
||||
updateVideoLayersArgsForCall []struct {
|
||||
arg1 []*livekit.VideoLayer
|
||||
}
|
||||
UpdateVideoTrackStub func(*livekit.UpdateLocalVideoTrack)
|
||||
updateVideoTrackMutex sync.RWMutex
|
||||
updateVideoTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}
|
||||
invocations map[string][][]interface{}
|
||||
invocationsMutex sync.RWMutex
|
||||
}
|
||||
@@ -1663,6 +1673,38 @@ func (fake *FakeMediaTrack) ToProtoReturnsOnCall(i int, result1 *livekit.TrackIn
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateAudioTrack(arg1 *livekit.UpdateLocalAudioTrack) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
fake.updateAudioTrackArgsForCall = append(fake.updateAudioTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateAudioTrackStub
|
||||
fake.recordInvocation("UpdateAudioTrack", []interface{}{arg1})
|
||||
fake.updateAudioTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateAudioTrackStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateAudioTrackCallCount() int {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
return len(fake.updateAudioTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateAudioTrackCalls(stub func(*livekit.UpdateLocalAudioTrack)) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateAudioTrackArgsForCall(i int) *livekit.UpdateLocalAudioTrack {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateAudioTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateTrackInfo(arg1 *livekit.TrackInfo) {
|
||||
fake.updateTrackInfoMutex.Lock()
|
||||
fake.updateTrackInfoArgsForCall = append(fake.updateTrackInfoArgsForCall, struct {
|
||||
@@ -1732,6 +1774,38 @@ func (fake *FakeMediaTrack) UpdateVideoLayersArgsForCall(i int) []*livekit.Video
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateVideoTrack(arg1 *livekit.UpdateLocalVideoTrack) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
fake.updateVideoTrackArgsForCall = append(fake.updateVideoTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateVideoTrackStub
|
||||
fake.recordInvocation("UpdateVideoTrack", []interface{}{arg1})
|
||||
fake.updateVideoTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.UpdateVideoTrackStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateVideoTrackCallCount() int {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
return len(fake.updateVideoTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateVideoTrackCalls(stub func(*livekit.UpdateLocalVideoTrack)) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) UpdateVideoTrackArgsForCall(i int) *livekit.UpdateLocalVideoTrack {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateVideoTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeMediaTrack) Invocations() map[string][][]interface{} {
|
||||
fake.invocationsMutex.RLock()
|
||||
defer fake.invocationsMutex.RUnlock()
|
||||
@@ -1789,10 +1863,14 @@ func (fake *FakeMediaTrack) Invocations() map[string][][]interface{} {
|
||||
defer fake.streamMutex.RUnlock()
|
||||
fake.toProtoMutex.RLock()
|
||||
defer fake.toProtoMutex.RUnlock()
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
fake.updateTrackInfoMutex.RLock()
|
||||
defer fake.updateTrackInfoMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
copiedInvocations := map[string][][]interface{}{}
|
||||
for key, value := range fake.invocations {
|
||||
copiedInvocations[key] = value
|
||||
|
||||
@@ -217,6 +217,17 @@ type FakeParticipant struct {
|
||||
toProtoReturnsOnCall map[int]struct {
|
||||
result1 *livekit.ParticipantInfo
|
||||
}
|
||||
UpdateAudioTrackStub func(*livekit.UpdateLocalAudioTrack) error
|
||||
updateAudioTrackMutex sync.RWMutex
|
||||
updateAudioTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}
|
||||
updateAudioTrackReturns struct {
|
||||
result1 error
|
||||
}
|
||||
updateAudioTrackReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
UpdateSubscriptionPermissionStub func(*livekit.SubscriptionPermission, utils.TimedVersion, func(participantID livekit.ParticipantID) types.LocalParticipant) error
|
||||
updateSubscriptionPermissionMutex sync.RWMutex
|
||||
updateSubscriptionPermissionArgsForCall []struct {
|
||||
@@ -241,6 +252,17 @@ type FakeParticipant struct {
|
||||
updateVideoLayersReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
UpdateVideoTrackStub func(*livekit.UpdateLocalVideoTrack) error
|
||||
updateVideoTrackMutex sync.RWMutex
|
||||
updateVideoTrackArgsForCall []struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}
|
||||
updateVideoTrackReturns struct {
|
||||
result1 error
|
||||
}
|
||||
updateVideoTrackReturnsOnCall map[int]struct {
|
||||
result1 error
|
||||
}
|
||||
invocations map[string][][]interface{}
|
||||
invocationsMutex sync.RWMutex
|
||||
}
|
||||
@@ -1330,6 +1352,67 @@ func (fake *FakeParticipant) ToProtoReturnsOnCall(i int, result1 *livekit.Partic
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrack(arg1 *livekit.UpdateLocalAudioTrack) error {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
ret, specificReturn := fake.updateAudioTrackReturnsOnCall[len(fake.updateAudioTrackArgsForCall)]
|
||||
fake.updateAudioTrackArgsForCall = append(fake.updateAudioTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalAudioTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateAudioTrackStub
|
||||
fakeReturns := fake.updateAudioTrackReturns
|
||||
fake.recordInvocation("UpdateAudioTrack", []interface{}{arg1})
|
||||
fake.updateAudioTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
if specificReturn {
|
||||
return ret.result1
|
||||
}
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrackCallCount() int {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
return len(fake.updateAudioTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrackCalls(stub func(*livekit.UpdateLocalAudioTrack) error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrackArgsForCall(i int) *livekit.UpdateLocalAudioTrack {
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateAudioTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrackReturns(result1 error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = nil
|
||||
fake.updateAudioTrackReturns = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateAudioTrackReturnsOnCall(i int, result1 error) {
|
||||
fake.updateAudioTrackMutex.Lock()
|
||||
defer fake.updateAudioTrackMutex.Unlock()
|
||||
fake.UpdateAudioTrackStub = nil
|
||||
if fake.updateAudioTrackReturnsOnCall == nil {
|
||||
fake.updateAudioTrackReturnsOnCall = make(map[int]struct {
|
||||
result1 error
|
||||
})
|
||||
}
|
||||
fake.updateAudioTrackReturnsOnCall[i] = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateSubscriptionPermission(arg1 *livekit.SubscriptionPermission, arg2 utils.TimedVersion, arg3 func(participantID livekit.ParticipantID) types.LocalParticipant) error {
|
||||
fake.updateSubscriptionPermissionMutex.Lock()
|
||||
ret, specificReturn := fake.updateSubscriptionPermissionReturnsOnCall[len(fake.updateSubscriptionPermissionArgsForCall)]
|
||||
@@ -1454,6 +1537,67 @@ func (fake *FakeParticipant) UpdateVideoLayersReturnsOnCall(i int, result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrack(arg1 *livekit.UpdateLocalVideoTrack) error {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
ret, specificReturn := fake.updateVideoTrackReturnsOnCall[len(fake.updateVideoTrackArgsForCall)]
|
||||
fake.updateVideoTrackArgsForCall = append(fake.updateVideoTrackArgsForCall, struct {
|
||||
arg1 *livekit.UpdateLocalVideoTrack
|
||||
}{arg1})
|
||||
stub := fake.UpdateVideoTrackStub
|
||||
fakeReturns := fake.updateVideoTrackReturns
|
||||
fake.recordInvocation("UpdateVideoTrack", []interface{}{arg1})
|
||||
fake.updateVideoTrackMutex.Unlock()
|
||||
if stub != nil {
|
||||
return stub(arg1)
|
||||
}
|
||||
if specificReturn {
|
||||
return ret.result1
|
||||
}
|
||||
return fakeReturns.result1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrackCallCount() int {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
return len(fake.updateVideoTrackArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrackCalls(stub func(*livekit.UpdateLocalVideoTrack) error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrackArgsForCall(i int) *livekit.UpdateLocalVideoTrack {
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
argsForCall := fake.updateVideoTrackArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrackReturns(result1 error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = nil
|
||||
fake.updateVideoTrackReturns = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) UpdateVideoTrackReturnsOnCall(i int, result1 error) {
|
||||
fake.updateVideoTrackMutex.Lock()
|
||||
defer fake.updateVideoTrackMutex.Unlock()
|
||||
fake.UpdateVideoTrackStub = nil
|
||||
if fake.updateVideoTrackReturnsOnCall == nil {
|
||||
fake.updateVideoTrackReturnsOnCall = make(map[int]struct {
|
||||
result1 error
|
||||
})
|
||||
}
|
||||
fake.updateVideoTrackReturnsOnCall[i] = struct {
|
||||
result1 error
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeParticipant) Invocations() map[string][][]interface{} {
|
||||
fake.invocationsMutex.RLock()
|
||||
defer fake.invocationsMutex.RUnlock()
|
||||
@@ -1499,10 +1643,14 @@ func (fake *FakeParticipant) Invocations() map[string][][]interface{} {
|
||||
defer fake.subscriptionPermissionMutex.RUnlock()
|
||||
fake.toProtoMutex.RLock()
|
||||
defer fake.toProtoMutex.RUnlock()
|
||||
fake.updateAudioTrackMutex.RLock()
|
||||
defer fake.updateAudioTrackMutex.RUnlock()
|
||||
fake.updateSubscriptionPermissionMutex.RLock()
|
||||
defer fake.updateSubscriptionPermissionMutex.RUnlock()
|
||||
fake.updateVideoLayersMutex.RLock()
|
||||
defer fake.updateVideoLayersMutex.RUnlock()
|
||||
fake.updateVideoTrackMutex.RLock()
|
||||
defer fake.updateVideoTrackMutex.RUnlock()
|
||||
copiedInvocations := map[string][][]interface{}{}
|
||||
for key, value := range fake.invocations {
|
||||
copiedInvocations[key] = value
|
||||
|
||||
@@ -254,6 +254,36 @@ func (u *UpTrackManager) UpdateVideoLayers(updateVideoLayers *livekit.UpdateVide
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *UpTrackManager) UpdateAudioTrack(update *livekit.UpdateLocalAudioTrack) error {
|
||||
track := u.GetPublishedTrack(livekit.TrackID(update.TrackSid))
|
||||
if track == nil {
|
||||
u.params.Logger.Warnw("could not find track", nil, "trackID", livekit.TrackID(update.TrackSid))
|
||||
return errors.New("could not find published track")
|
||||
}
|
||||
|
||||
track.UpdateAudioTrack(update)
|
||||
if u.onTrackUpdated != nil {
|
||||
u.onTrackUpdated(track)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *UpTrackManager) UpdateVideoTrack(update *livekit.UpdateLocalVideoTrack) error {
|
||||
track := u.GetPublishedTrack(livekit.TrackID(update.TrackSid))
|
||||
if track == nil {
|
||||
u.params.Logger.Warnw("could not find track", nil, "trackID", livekit.TrackID(update.TrackSid))
|
||||
return errors.New("could not find published track")
|
||||
}
|
||||
|
||||
track.UpdateVideoTrack(update)
|
||||
if u.onTrackUpdated != nil {
|
||||
u.onTrackUpdated(track)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (u *UpTrackManager) AddPublishedTrack(track types.MediaTrack) {
|
||||
u.lock.Lock()
|
||||
if _, ok := u.publishedTracks[track.ID()]; !ok {
|
||||
|
||||
Reference in New Issue
Block a user