100 Commits
Author SHA1 Message Date
David Zhao 59112b9200 Increase default message channel from 200 -> 10k (#638) 2022-04-20 16:34:00 -07:00
David Zhao f699499220 Update to Pion 3.1.32 - avoid retrying when mux buffer is full (#637) 2022-04-20 14:47:00 -07:00
David Zhao 1cfc483d8f Do not pass STUN servers when using ICE Lite (#634) 2022-04-20 00:29:57 -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 Zhao 431069af95 Rename StatsUpdateFrequency -> StatsUpdateInterval 2022-04-19 22:22:58 -07:00
David Zhao 282e2aed49 Increase frequency of status updates and longer availability threshold (#628)
* Increase frequency of status updates and longer avail. threshold.

* better fix.

* fix room close test failure due to slow peer connection Close

* Perform avg computation more frequently if data has changed
2022-04-19 22:18:00 -07:00
David Zhao 7a60278f64 Improve docker connectivity by using srflx candidates (#624)
When deployed via Docker and without using host networking, we'll be
assigned an IP behind NAT. By giving it STUN servers, it should be
connectable even without passing in `--node-ip` explicitly
2022-04-19 09:53:17 -07:00
David Zhao 69d9cc19bc Switch back to reconnecting only on failure. (#604)
Sometimes peerconnection jumps to disconnected periodically even
when the underlying connection is ok. In these cases we are
triggering unnecessary connection restarts.

Given this, we'll leave the responsibility of early-detecting
disconnections to clients, where they have more control/knowledge
of networking conditions.
2022-04-07 23:11:11 -07:00
David Zhao 4475a028b6 Removed REMB references for publisher (#605) 2022-04-07 18:24:11 -07:00
David Zhao a55f3a6921 Update to ICE v2.2.3 - fixes writing to stuck TCPMux (#606) 2022-04-07 18:23:57 -07:00
David Zhao 8fbe00edb3 Avoid locking when flushing DownTrack (#594) 2022-04-05 23:45:51 -07:00
David Zhao 130aefa597 Use type-specific track prefixes. (#586)
* Use type-specific track prefixes.

Making it easier to identify track type from its ID

* also include track source
2022-03-31 12:35:15 -07:00
David Zhao 52fccb2a17 v0.15.6 2022-03-27 22:42:03 -07:00
David Zhao f2556483a3 Re-issue tokens when clients initially connect. (#569)
This ensures if they are disconnected before token is refreshed, they
could reconnect back with a valid token.
2022-03-25 23:55:19 -07:00
David Zhao 51cf626a70 Dump goroutines when possible deadlock is detected (#568) 2022-03-25 23:54:35 -07:00
David Zhao 7aa48e9450 Fix buildLinux mage command 2022-03-23 09:23:59 -07:00
David Zhao dfd3dade00 Disallow pause by default (#554) 2022-03-22 22:07:01 -07:00
David Zhao f992202903 Update to Pion v3.1.27: fix for mux deadlock (#555) 2022-03-22 16:21:46 -07:00
David Zhao 825d3cdbea Cleanup after disconnected participants. Follow up to #537 (#548) 2022-03-21 20:48:06 -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 2155405736 Handle non-primary peerconnection if/when it becomes disconnected (#537)
* Handle non-primary peerconnection if/when it becomes disconnected

* avoid storing nil
2022-03-19 00:31:45 -07:00
David Zhao 224dfe68b1 Fix magefile compatibility with Windows (#538) 2022-03-18 23:53:05 -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
David Zhao d498cccc05 Fixed panics with nil stats (#517) 2022-03-15 12:01:26 -07: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
David Zhao 7a5b5dbc69 Pass back serverRegion in when participant's joining (#479)
* Pass back serverRegion in when participant's joining

* fix tests

* protocol update
2022-03-02 13:36:19 -08:00
David Zhao 7449175c8e Fix participant update version generation. (#477)
Previously it was stuck at 1
2022-03-01 09:36:11 -08:00
David Zhao 933b41e42a v0.15.5 2022-02-27 16:55:48 -08:00
David Zhao 433a5cd8d1 Disable default node limits (#472)
* Disable default node limits

* removed unused vars
2022-02-27 16:54:39 -08:00
David Zhao 130decbf1d CI step for static check (#467)
* CI step for static check

* fix staticcheck
2022-02-24 23:07:15 -08:00
David Zhao 6d88154402 Reduce lock scope, avoid callbacks under lock (#462) 2022-02-24 15:09:34 -08:00
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 Zhao a48cb6d0c4 Avoid deadlock during room close (#451)
* avoid deadlock during room closse

* better fix
2022-02-20 21:14:57 -08:00
David Zhao c20fb237d5 Initialize subscriber quality to default layer (#444) 2022-02-18 09:21:24 -08:00
David Zhao aadfc97b0b Minor cleanup, updated docs to reflect Swift (#428) 2022-02-10 00:31:09 -08:00
David Zhao 837f64643f v0.15.4 2022-02-09 12:08:56 -08:00
David Zhao a6eb4290d3 Generate telemetry stubs (#412) 2022-02-07 23:15:24 -08:00
David Zhao 81521f80db Support for custom TURN servers (#409)
Closes #271
2022-02-05 23:15:58 -08:00
David Zhao e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
David Zhao 6f6d55345b Use ParticipantInfo version to ensure consistency (#399)
* Use ParticipantInfo version to ensure consistency

Deprecating time.Time and avoid locking unnecessarily

* properly adjust ulimit. update protocol

* Save initial version from params

* get rid of metadata field, use grants copy

* fix test
2022-02-03 17:10:52 -08:00
David Zhao 7297a57f3d Improve TestMultiNodeRefreshToken reliability 2022-02-02 21:29:57 -08:00
David Zhaoandboks1971 a8d43aab67 Uses IceLite only for protocol 6 clients (#397)
* Update to Pion v3.1.20, with fixes DTLS role ambiguity

* Gate ice-lite on protocol version

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2022-02-02 21:16:08 -08:00
David Zhao 3430650d3e Server-side parsing of UserAgent (#387) 2022-01-29 00:52:06 -08:00
David Zhao f9cb274521 v0.15.3 2022-01-28 21:59:51 -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 69116a57fc Correctly use writeParticipantMessage for APIs (#376) 2022-01-26 00:26:42 -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 4ebfc2eef6 Fix missing docker prefix 2022-01-21 15:13:44 -08:00
David Zhao c3dec00510 Deprecation notice for old deployment scripts
Fixed #355.
2022-01-21 14:28:03 -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 Zhao b906f37937 Quickstart edits in README 2022-01-20 20:58:03 -08:00
David Zhao 31a0275c0b Included link to connection tester 2022-01-19 22:12:14 -08:00
David Zhao 6400de1c10 Readme update - simpler getting started (#350)
* simpler setup instructions

* access tokens link
2022-01-18 23:33:02 -08:00
David Zhao 76b2442f40 Link to Ruby SDK 2022-01-18 17:21:17 -08:00
David Zhao 88cad8f093 Generate cleaner configs (#347)
Also upgrade to v1.17 for docker builds
2022-01-17 23:54:04 -08:00
David Zhao c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
David Zhao f2f776931f Integrated logging with Pion (#341)
* Integrated logging with Pion

* handle nil logger
2022-01-14 17:44:28 -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
David Zhao 29eb8d9dbf Parse additional info parameters clients could send (#336) 2022-01-13 08:40:29 -08:00
David Zhao b05d154d12 Handle simulated leave (#333) 2022-01-11 23:34:27 -08:00
David Zhao c2ba26eee6 Handle SimulateScenario requests (#330)
* Handle SimulateScenario requests

* actually use sendLeave

* fix local test failures due to filehandle limit
2022-01-11 00:37:24 -08:00
David Zhao dd612f966d Documentation around congestion control config option 2022-01-05 23:02:00 -08:00
David Zhao d5c955d11f bump version v0.15.2-SNAPSHOT 2022-01-02 22:39:09 -08:00
David Zhao d7d3ffdd13 Fix missed update when subscribers are subscribing to the same layer (#310) 2021-12-31 23:54:41 -08:00
David Zhao 2d8106c3d7 go mod tidy 2021-12-29 22:04:46 -08:00
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
David Zhao 472f51cdba Fail IP lookup with STUN failure (#289)
Resolves #226
2021-12-27 16:43:13 -08:00
David Zhao 554baa54f6 Avoid locking while waiting for receiver read (#288)
A deadlock was observed in this section, when Read was waiting for data.
2021-12-27 13:35:30 -08:00
David Zhao 857ff7fae7 Update pion/turn to fix TURN TLS termination with external LB
version v0.15.1
2021-12-22 15:00:25 -08:00
David Zhao 7a54a810c9 Update pion/turn to fix TURN TLS termination with external LB 2021-12-22 14:56:18 -08:00
David Zhao e626ad3eaa version v0.15.0 2021-12-22 13:07:18 -08:00
David Zhao c49abf9f28 Increased layer tolerance to improve rendering quality (#283) 2021-12-22 13:05:43 -08:00
David Zhao 33a7df59bd Moved ConnectionQuality to PublishedTrack interface.
it wasn't needed for other MediaTrack implementations
2021-12-21 14:38:16 -08:00
David Zhao b32ab0e54f Fix incorrect order of parameters passed to NewSubscribedTrack (#272)
* Fix incorrect order of parameters passed to NewSubscribedTrack

Switched to explicit values via a params struct
2021-12-20 14:02:33 -08:00
David Zhao c08d1e9d72 Improve test CI (#262)
* minimal change

* Better test format for GH CI

* Give server a bit longer to startup, to improve GH test
2021-12-14 17:15:08 -08:00
David Zhao 8abd734d16 Use participant and room specific loggers (#252) 2021-12-10 15:51:05 -08:00
David Zhao d342335d09 Split out SignalHandler to simplify testing (#250) 2021-12-10 13:12:45 -08:00
David Zhao 882f3bdde5 Allow subscription requests made from server APIs (#249) 2021-12-10 11:51:03 -08:00
David Zhao bda2e9cc59 Update protocol to v0.11.0 2021-12-08 13:59:55 -08:00
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
David Zhao 318bee4f1e Improve video quality selection by using publisher feedback (#238) 2021-12-06 12:12:08 -08:00
David Zhao c00d799ac6 Fixed permission handling with room deletion (#233) 2021-12-03 14:27:13 -08:00
David Zhao 50469b33a9 Fixed incorrect simulcast information (#218) 2021-11-30 21:22:16 -08:00
David Zhao a799069392 Add note about node-ip being public IP 2021-11-30 08:57:44 -08:00
David Zhao 1652fd5dc9 remove go fmt watcher 2021-11-28 11:02:19 -08:00
David Zhao 6dcb29c559 Use publisher PC as default with publish-only connections (#198) 2021-11-20 22:28:36 -08:00
David Zhao 79cfc0d76a update protocol & pion versions 2021-11-19 21:25:08 -10:00
David Zhao 202cabbb10 v0.14.2 2021-11-19 07:28:19 -10:00
David Zhao ffb2c50a70 Fixed room API breakage (#190) 2021-11-14 11:18:01 -08:00
David Zhao ceae58ac20 Fixed deadlocks occurring in Receiver writeRTP (#189)
When we RLock during write cycles, the mutex spends the majority of its time
staying locked. As new participants join, they have to acquire the WLock
before downtracks could be add it.

In load test scenarios (25 participants joining together), it's common to see
goroutine dump showing MediaTrack.AddSubscriber -> DownTrack.storeDownTrack trying to acquire mutex, and never able to acquire it.
2021-11-13 22:59:53 -08:00
David Zhao 6500ce262d Fix publisher loss reporting (#186) 2021-11-11 23:29:54 -08:00
David Zhao 5a057f3d19 Handle nil when buffer pair doesn't exist 2021-11-11 23:16:21 -08:00
David Zhao 1e2e53a575 v0.14.1 2021-11-11 13:29:39 -08:00