Commit Graph
55 Commits
Author SHA1 Message Date
Hiroshi HorieandGitHub 77dc98601a Option to unpublish without stopping track (#45)
* implement

* rename

* only for local

* keep option

* no per unpublish option to stop track

* format

* format
2021-12-03 11:06:21 +07:00
Hiroshi Horie 2244e31e5b throw if unknown track type 2021-12-03 02:02:28 +07:00
Hiroshi Horie adc97a154b no casting required for getTrackPublicationBySource 2021-12-03 01:36:22 +07:00
Hiroshi Horie 19869a1575 minor fix 2021-12-03 01:10:40 +07:00
Hiroshi Horie f0995ef85e better type for TrackPublication param 2021-12-03 01:05:52 +07:00
Hiroshi Horie 4c66704427 participant to parent (TrackPublication) 2021-12-03 00:57:42 +07:00
Hiroshi Horie e597e4f2fd move reference to engine to parent (Participant) class 2021-12-03 00:17:03 +07:00
Hiroshi Horie 08d9575ec5 better type for Participant.trackPublications 2021-12-03 00:08:30 +07:00
Hiroshi Horie caa2e16fd8 return publication for TrackSource apis 2021-12-02 07:44:02 +07:00
Hiroshi Horie 725214e4f9 return correct type for publish 2021-12-02 07:37:48 +07:00
Hiroshi Horie 09eb52bc55 use object type instead of checking kind 2021-12-02 07:15:59 +07:00
Hiroshi HorieandGitHub 44864ff525 Type-aware Publication etc (static typing) (#43)
* implemented

* format

* add missing type
2021-12-01 12:15:09 +07:00
David ZhaoandGitHub 004f8c7fdb Send video dimensions to the server (#41) 2021-11-30 20:45:09 -08:00
Hiroshi Horie 2cd3198cdd organize track & pub to directory 2021-11-30 17:29:18 +07:00
Hiroshi Horie 11a1d22e7f format 2021-11-30 16:04:37 +07:00
Hiroshi HorieandGitHub 8037d80674 Release camera/mic when muted, restartTrack when unmuted (#39)
* re-structure tracks

* publication.track is now a LocalTrack or RemoteTrack

* restartTrack when unmute

* stop/start on restartTrack

* move to mute/unmute

* format

* remove comment
2021-11-30 15:58:19 +07:00
Hiroshi Horie 9e0a3b19fe return casted list for videoTracks/audioTracks/subscribedTracks 2021-11-30 12:37:13 +07:00
Hiroshi HorieandGitHub 4f0973ce66 Match muted behavior with JS SDK (#32)
* attempt 1

* implement

* clean up

* clean up

* cleaner code

* mute was opposite

* fix suggestion

* fix local pub muted

* update example

* update pubs

* format
2021-11-20 02:39:52 +07:00
davidliuandGitHub 4a59a1e6d5 android screenshare example and touch ups (#31) 2021-11-17 17:11:46 +09:00
Hiroshi HorieandGitHub 1095e25113 Simpler APIs (#28)
* TrackSource

* remove absolute import

* typo

* get track

* set source enabled

* fix symbol collision

* move to participant

* update proto

* screen share audio

* typo

* format

* change screen share name
2021-11-11 00:20:32 +09:00
Hiroshi HorieandGitHub d31daa5d8e Connection quality (#27)
* update protos

* signal event

* implemented

* format

* implement example

* protocol 5

* icon size
2021-11-06 17:36:47 +09:00
Hiroshi Horie 721b04753a remove unnecessary cast 2021-10-28 15:56:15 +09:00
Hiroshi Horie b42257473b LocalTrackPublishedEvent LocalTrackUnpublishedEvent 2021-10-28 15:55:25 +09:00
Hiroshi Horie 79a2d20702 optimizeVideo option 2021-10-28 02:57:15 +09:00
Hiroshi Horie a0a9acc9d9 example app: allow scroll in connect page 2021-10-28 02:14:52 +09:00
Hiroshi Horie 8d80a9296a TrackPublishedEvent for local tracks 2021-10-27 22:05:33 +09:00
Hiroshi HorieandGitHub 6240457333 Option to control DTX (#25)
* protocol 4

* default to v4

* mediaStreamTrack.enabled

* track start

* private constructor

* remote audio/video tracks

* log sdp

* organize imports

* dtx option (default true)
2021-10-26 02:53:34 +09:00
Hiroshi HorieandGitHub 71a21f00b6 Reuse transceivers (#24)
* protocol 4

* default to v4

* mediaStreamTrack.enabled

* track start

* private constructor

* remote audio/video tracks

* log sdp

* organize imports
2021-10-26 02:46:10 +09:00
Hiroshi HorieandGitHub 16910cae25 Video optimizations (#18)
* use events for `VideoTrackRenderer`

* logger

* implemented visibility detection

* optimize code with 1 param debounce func

* stop pending visibility event when disposed

* clean up

* mark internal

* report to track

* call dispose on pub and track

* use internal events to receive visibility events

* clean up visibility for disposed track

* listen to track visibility events on pub

* re-design

* quickly re-enable

* clean up

* clean up
2021-10-25 18:34:02 +09:00
Hiroshi Horie 6d4f32233f format 2021-10-24 02:18:43 +09:00
Hiroshi Horie 6a43f3394c call dispose on pub and track 2021-10-22 23:14:26 +09:00
Hiroshi Horie ab028195de mark internal 2021-10-22 03:30:05 +09:00
Hiroshi Horie a1c80dee83 Revert "mute new mediaTrack if pub is muted"
This reverts commit 8a68810138.
2021-10-22 02:48:06 +09:00
Hiroshi Horie 8a68810138 mute new mediaTrack if pub is muted 2021-10-21 21:37:06 +09:00
Hiroshi HorieandGitHub 48e03b84cb Create android & web plugins (#15)
* create android & web plugins

* apply `flutter format .`
2021-10-02 15:20:41 +09:00
Hiroshi HorieandGitHub b67c807fd5 Organize events (#13)
* move internal events & remove unused events

* `TrackUnpublishedEvent` for local tracks

* update example since we have local track unpublish events

* use flutter_webrtc 0.6.9
2021-10-01 16:56:36 +09:00
Hiroshi HorieandGitHub 001f688729 Better audio management (#10)
* add audio_session package

* `AudioManager` initial design

* try to integrate audio manager

* configure audio session

* `DisposeAware`

disposing if already published causes exception.

* organize

* guard flutter_webrtc calls

* websocket async fix

* use `ConnectionState` instead of `_isClosed` and `isReconnecting`

* change create audio track defaults

* update protos

* protocol 3 speaker updates

* fix exception

* emit `RoomDisconnectedEvent` only once

* fix exception

* keep track of local / remote audio tracks

* explicit types

* manage track state

* re-structure audio management

* change defaults

* unpublish all

* use experimental build

* change defaults

* configuring is optional

* call native `RTCAudioSession.setConfiguration`

* defaults adjustment

* iOS only for now

* use lib 92.4515.07

* clean up

* revert audio options for now

* remove pod source

* rename apple related audio

* `createListener` method

* organize native audio

* `SpeakingChangedEvent` only on `Participant`

* refactoring

* fix ios compile

* fix configure audio only for iOS logic

* minor fix & clean up

* change dispose logic

* format protos

* fix unpublishTrack

* `createListener` into a mixin

* simplify

* use flutter_webrtc master

* unpublish for example

* update ios icon

* android icon

* web icon

* favicon
2021-10-01 02:47:18 +09:00
Hiroshi HorieandGitHub 6445b8d2a8 Switch to new event system (#9)
* `SignalEvents` and `synchronized` mode for `EventsListenable`

* cascade syntax

* clean up

* `RoomEvents`

* `ParticipantEvents`

* all events implemented

* make it compile with M1 macs

* dispose logic

* cleaner connect logic

* ask to publish

* fix initial EngineTrackAddedEvent glitch

* fix unpublishTrack bug

* clean up

* better events docs

* organize event types

* clean up

* cleaner wait logic

* wait for event instead of using Completer

* notifyListeners
2021-09-24 23:37:26 +09:00
Hiroshi HorieandGitHub f4bd82a919 Subscriber as primary (#8)
* Update protos

* Signal client

* Improve transport

* First implementation

* Fix publish

* Update `PCTransport` for debounce negotiation

* debounce func

* reconnect & events

* Update debounce func

* engine events

* make sure events don't emit after dispose

* prefix flutter_webrtc

* Cleaner `iceServers` update

* don't mutate user provided params

* fix tests

* event manager

* Fix: `Room.onDisconnected` gets fired multiple times

* data publish in example

* cleaner logic

* safer events

* un-prefix with LK

* organize imports

* Clean up

* remove `Tuple`

* `EventsEmitter` can now be directly listened to

`EventsEmitter` extends `EventsListenable`
2021-09-18 00:10:16 +09:00
Hiroshi HorieandGitHub 50f56c5e1e Simulcast, Screen sharing & Various improvements (#4)
* Respect `RTCIceTransportPolicy` enum and organize

* Simplify syntax where possible etc.

* Combine `VideoPreset` and `VideoPresets`

* Default values for `ConnectOptions`

* Build URI instead of String manipulation

* Slight modifications to Exception

* `LiveKitTheme` for example

* `VideoEncoding` class

* Organize imports

* First simulcast implementation

* Remove unnecessary try-catches

* Update Android settings

* Remember uri and token

* example improvements

* `fit` parameter for VideoTrackRenderer

* Simulcast option for example

* Pass `defaultPublishOptions`

* Show only `VideoQuality`

* Pass tests

* Better buildUri logic

* Named parameter to positional

* Explicit imports

* `VideoParameter` instead of `VideoPreset`

* Use `mediaTrack.getSettings` when possible

* Safer dispose logic

* Safer `PCTransport`

Update transport.dart

* Synchronized events for `SignalClient`

* Use logger instead of print

* Make example compile for iOS

* First screen share implementation

* Make example work with screen share

* Example improvement

* Code optimization

* Don't depend on web_socket_channel

* Fix: Unpublish track bug

* Show participant mute state & identity

* Update protos

* Remote mute/unmute

* iOS Background mode

* Separate `createCameraTrack` and `createScreenTrack`

* Clean up

* PB fix

* format

* Fix analyzer warning

* Android clean up

* Update README.md

* Clean up
2021-09-11 03:14:14 +09:00
Hiroshi HorieandGitHub ab31ddabb9 Apply Flutter best practices [Non-Breaking] (#2)
* Add flutter_lints package

* Use key in widget constructors

lint: use_key_in_widget_constructors

* Unnecessary new keyword

lint: unnecessary_new

* Prefer const with constant constructors

* Exclude protobuf files from analyzer

* Private field could be final

* Annotate overridden members

* Use initializing formals when possible

* Don't access members with `this` unless avoiding shadowing

* Prefer is! operator

* Use isEmpty instead of length

* Use collection literals when possible

* Revert comment changes

* Cleaner null testing

* Misc fixes

* Avoid using `forEach` with a function literal

* Prefer `final` over `var` where applicable

* Enforce stricter type-checking

* Ignore VS Code files

* Flutter format

* Prefer using lowerCamelCase for constant names

* flutter format -l 100

* Disable `avoid_print` for examples

* Slight improvements to example

Should solve lint error: no_logic_in_create_state
2021-08-31 16:35:07 +09:00
David Zhao d011bc7d3d Documentation 2021-08-30 15:31:12 -07:00
David Zhao 3a26044399 manually handle audio tracks for web 2021-08-26 22:58:04 -07:00
David Zhao 82322be783 fix bug preventing publishing for web (thanks @HiroshiHorie) 2021-08-11 12:16:20 -07:00
David Zhao 908c830b86 return connection error message, removed mediastream during publishing 2021-08-05 23:20:20 -07:00
David Zhao 1ca8b3fa0c fix analyze warnings 2021-08-04 23:21:54 -07:00
David Zhao 8cd7546d2f minor tweaks & cleanup 2021-08-04 22:52:16 -07:00
David Zhao 593890331e connectivity handling, audio publishing 2021-08-04 10:59:41 -07:00
David Zhao aec2003140 video rendering, local track creation 2021-08-03 10:25:00 -07:00
David Zhao d193b9fb7f Participant ChangeNotifier 2021-07-25 22:22:11 -07:00