Commit Graph

110 Commits

Author SHA1 Message Date
cnderrauber
48588d7c3d code clean & fix h264 test fail (#1028) 2022-09-21 16:59:18 +08:00
Mathew Kamkar
767d660809 Use LocalNode ID in Prometheus metrics (#959) 2022-08-25 22:16:20 -07:00
Raja Subramanian
06a46d5de0 Replace Target with params to indicate direction (#955)
* Replace Target with params to indicate direction

* Add missed send answer call
2022-08-25 08:33:06 +05:30
Raja Subramanian
00b131da50 Wait for fully established to ensure data channel is ready (#949) 2022-08-24 16:51:43 +05:30
Raja Subramanian
aaa3a5b46e Transport restructure (#944)
* WIP commit

* WIP commit

* fix copy pasta

* setting PC with previous answer has to happen synchronously

* static check

* WIP commit

* WIP commit

* fixing transport tests

* fix tests and clean up

* minor renaming

* FIx test race

* log event when channel is full
2022-08-24 14:31:45 +05:30
David Zhao
ab1ccae0c7 Respond to signal ping / pong (#871)
* Respond to signal ping / pong

* Pass back 1 for pong for now, we don't need the timestamp

* update protocol
2022-08-05 09:24:47 -07:00
Raja Subramanian
e624604453 Revert "ListRooms using sid (#842)" (#845)
This reverts commit f2e1e67e58.
2022-07-21 14:49:41 +05:30
Raja Subramanian
f2e1e67e58 ListRooms using sid (#842)
* ListRooms using `sid`

* correct field name

* Remove contains and latest protocol
2022-07-21 11:05:33 +05:30
cnderrauber
6ba034feae shorten the time cost for subscriber get media tracks (#747)
* set DownTrack's initial codec to first codec of potential codecs

* faststart on subscribe
2022-06-02 10:00:42 +08:00
Dan McFaul
aa0df2813f deleting nonRtc rooms and fixing race when deleting rooms (#721) 2022-05-27 09:45:22 -06:00
David Zhao
a933f1513f Add pprof endpoint when running in dev mode (#708) 2022-05-23 00:34:16 -07:00
David Zhao
57e2321a18 Expose Participant.IsPublisher to differentiate pubs from subs (#643) 2022-04-21 22:15:01 -07:00
David Zhao
b821a0997d Use common logging init functions (#633)
* Use common logging init functions

* update protocol commit

* fix tests
2022-04-20 00:15:11 -07:00
David Colburn
0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -07:00
David Zhao
5920672802 feat: unpublish tracks after publish permissions are revoked. (#545)
* feat: unpublish tracks after publish permissions are revoked.

Uses protocol 7 to indicate client support, otherwise it attempts to
mute the tracks.

Also sends back permissions objects of all participants, and cleaned up
our handling of various permissions attributes.

* fix static check
2022-03-21 00:20:48 -07:00
David Zhao
f14c452f8c Telemetry and webhook improvements. (#535)
* Telemetry and webhook improvements.

* avoid blocking on telemetry channel - increase channel size and drop when full
* send ParticipantJoined webhook when fully joined (i.e. on ParticipantActive)
* send TrackPublished & TrackUnpublished webhooks
* increase number of parallel webhook workers to 50

* update protocol
2022-03-18 23:20:33 -07:00
cnderrauber
128199e634 don't send datatrack info to client (#492)
* don't send datatrack info to client
2022-03-08 17:05:26 +08:00
David Zhao
d57f76fbef Use trackID consistently as log key (#491)
* Use trackID consistently as log key

* more useful logging for track published
2022-03-07 21:02:08 -08:00
cnderrauber
913ef3a646 Datatrack for data channel (#476)
* data track
2022-03-01 15:48:20 +08:00
Raja Subramanian
778d1aa141 utils.AtomicFlag -> atomic.Bool (#466)
* Replacing hand rolled ion-sfu atomic with uber/atomic

* Remove another hand rolled atomic

* utils.AtomicFlag -> atomic.Bool
2022-02-25 12:19:49 +05:30
Raja Subramanian
0170cc1cb6 Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck`
Uneaarthed a couple of real bugs
2022-02-25 12:04:08 +05:30
David Zhao
7eb2fecadd Close websocket connection upon join failure (#458)
* Close websocket connection on join failure to avoid hang

* fix auto creation bug
2022-02-22 17:43:25 -08:00
David Colburn
7bbd238188 clean up logs and imports (#400) 2022-02-03 14:20:19 -07:00
David Zhao
7297a57f3d Improve TestMultiNodeRefreshToken reliability 2022-02-02 21:29:57 -08:00
David Zhao
a5d779a8b2 Increase test client timeout 2022-01-28 21:43:57 -08:00
David Zhao
6af6eefb8c Improve readability of test failures (#386) 2022-01-28 21:34:21 -08:00
David Zhao
9747243ce2 Honor autoSubscribe when subscription permissions are granted later (#381)
* Ensure autosubscribe is honored when subscription permissions were granted later

* negotiate even if no media has been added

* don't double-negotiate
2022-01-28 09:55:10 -08:00
David Zhao
52fc53d325 Issue updated tokens to clients. (#365)
This ensures client reconnect attempts would be successful for long running rooms. It also fixes inaccurate permissions that were set incorrectly when full reconnections take place.
2022-01-23 23:15:49 -08:00
David Zhao
f9a1dd97c2 Ensure RoomService operation is complete prior to returning (#362)
* Ensure service doesn't return before operation is complete

* added integration tests for RoomService
2022-01-21 11:00:33 -08:00
David Zhao
126bb8867b Ability to disable auto-create (#361)
* setting to disable autocreate

* improve test reliability

* update comment

* update to address feedback
2022-01-21 09:57:36 -08:00
David Colburn
5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
David Zhao
c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
David Zhao
cd9c125414 Also allow headers with CORS (#339) 2022-01-14 10:13:11 -08:00
David Zhao
f9b2af0cf9 Use CORS middleware to allow RoomService use (#335) 2022-01-13 09:29:48 -08:00
cnderrauber
54e13d20bb sfu node always pick ice controlled role(lite) (#322)
* sfu node always pick ice controlled role(lite)

* fix test case

Co-authored-by: cnderrauber <zengjie9004@gmail.com>
2022-01-10 12:58:10 +08:00
Raja Subramanian
995c1e8676 type aliases -> type definitions (#312)
* type alias -> type definition

* participantSid -> participantID in a comment

* Update protocol
2022-01-03 12:43:58 +05:30
David Zhao
3108ef22ad Ability to set name on Participant (#293) 2021-12-28 00:12:04 -08:00
David Zhao
b747cdb822 Pass along mime type with TrackInfo (#292) 2021-12-27 23:43:30 -08:00
David Zhao
87a799bae2 Include unique id and timestamp with webhook events (#291)
Resolves #230
2021-12-27 23:33:06 -08:00
David Zhao
15cd98be22 Enable Room.List to filter by specific names (#290) 2021-12-27 23:32:29 -08:00
Raja Subramanian
1dcc62b569 SubscribedQualityUpdate message (#270)
* WIP commit

* SubscribedQualityUpdate message to send list of currently subscribed
qualities for a simulcast video publisher

* Correct subscriberID

* goimports

* Do quality update on add/remove of subscribed track

* do not update quality when admin mute is active

* update quality on admin unmute

* Update protocol version

* Simplify max subscribed quality loop per David's suggestion
2021-12-19 12:41:40 +05:30
David Colburn
faa870de3d Move callbacks out of messageRouter (#269)
* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
2021-12-17 13:19:23 -08:00
Raja Subramanian
e54ce4f674 Stream Allocator Try 3 (#257)
* Stream Allocator Try 3

Making an intermediate PR to do
- Special treatment for screen share tracks
- When allocating all tracks,
  o try to stream all tracks by starting with the lowest layer
  o multi-pass across tracks to get a more even distribution

Not yet done:
-------------
In deficient state,
o Allocate a specific track on a change
o Steal from other tracks

* Correct sense of managed track

* have to range to copy

* generate

* fix VideoLayers compare

* Use t.simulcasted
2021-12-14 12:48:09 +05:30
David Zhao
2d93ccd668 Updated protocol from protocol/proto -> protocol/livekit (#242)
* Updated protocol from protocol/proto -> protocol/livekit

* separate MediaTrack from PublishedTrack
2021-12-08 13:58:38 -08:00
shishirng
461f29c097 Allow participants to create new connection for publishing new tracks (#224)
* Allow participants to create new connection for publishing new tracks

new param 'publish=<name>' enables publishing new connection with publish
only grants. Also, identity is appended with '#<name>'

* Add integration test to duplicate publish only connection

Signed-off-by: shishir gowda <shishir@livekit.io>

* Reuse token in test and set subscribeGrant to false on publish param

Signed-off-by: shishir gowda <shishir@livekit.io>

* create auth token with grants

Signed-off-by: shishir gowda <shishir@livekit.io>

* Signal ice on negotiate in test client

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update pkg/service/rtcservice.go

Co-authored-by: David Zhao <david@davidzhao.com>

Co-authored-by: David Zhao <david@davidzhao.com>
2021-12-07 16:23:16 -05:00
cnderrauber
b7f32dfffd Handle multiple codecs in renegotiation (#191)
* Handle multiple codecs in renegotiation

update pion to v3.1.9 for answer same order of codec as publisher.
register enable codecs in subscriber peerconnectin created.

add codec parameter to buffer.bind
buffer should use the codec of TrackRemote as it's codec mime.

sent h264blankframe when DownTrack closing
2021-11-17 21:18:43 +08:00
Artur Shellunts
03342efe4f Test improvements (#136)
* Fix "ineffectual assignment" linter warning

* Simplify TestClientCouldConnect

* Simplify range expression
2021-10-10 22:37:31 -07:00
Artur Shellunts
1c12272927 Refactor singlenode_test.go (#131)
* Fix typo

* test: move client creation to where it is used

* Refactor TestAutoSubDisabled
2021-10-04 13:07:38 -07:00
David Zhao
ff47301820 Implements protocol 3 speaker updates (#120)
* Disallow AddTrack from participants that don't have the permission

* Support protocol 3 speaker updates, client info

* update protocol

* Disallow AddTrack from participants that don't have the permission

* increase wait time for GH to pass
2021-09-17 11:47:13 -07:00
Mathew Kamkar
700a879c0b Redis Router graceful stop (#116)
* prestop and hasparticipants in interface

* add prestop function to existing routers

* fakerouter prestop

* update protocol version

* read lock

* redis router graceful stop

* test fix

* force stop
2021-09-15 13:07:44 -07:00