Commit Graph
60 Commits
Author SHA1 Message Date
Hiroshi Horie a82c5a7a50 VideoDimensions instead of width height 2021-12-13 21:49:42 +07:00
Hiroshi HorieandGitHub b6494a8ede Default capture options (#51)
* default capture options

* separate camera & screen share capture options
2021-12-13 02:21:46 +07:00
Hiroshi Horie b91c822fba more docs 2021-12-12 19:09:38 +07:00
Hiroshi Horie 8041f45def option docs 2021-12-12 18:32:34 +07:00
Hiroshi HorieandGitHub b85ecc1588 Fix: mute Remote mute/unmute events (#54)
* fix

* format
2021-12-12 14:01:58 +07:00
Hiroshi Horie 2b88ffd5f9 better logging for mute 2021-12-11 18:26:58 +07:00
Hiroshi Horie 7e1164a74c fix imports 2021-12-10 23:14:21 +07:00
Hiroshi Horie 7a8f03963e fix imports 2021-12-10 00:27:43 +07:00
Hiroshi Horie a706a5e1fb organize ConnectOptions RoomOptions RTCConfiguration 2021-12-10 00:23:45 +07:00
Hiroshi Horie c4e56af4c0 format 2021-12-07 12:33:12 +07:00
Hiroshi Horie d20a6e2ddb fix compiling since VideoQuality moved to another file 2021-12-07 12:30:46 +07:00
Hiroshi Horie 5f12be5f11 update proto 2021-12-07 11:54:39 +07:00
Hiroshi Horie 24e26fde78 Merge branch 'main' of https://github.com/livekit/client-sdk-flutter 2021-12-07 02:04:45 +07:00
Hiroshi Horie d4a37dd720 fix compile 2021-12-07 02:03:53 +07:00
Artur ShelluntsandGitHub 662b97b273 Fix mute/unmute on Windows (#47)
ReplaceTrack is not implemented in flutter_webrtc/windows.
2021-12-06 19:45:04 +01:00
davidliuandGitHub 6b80d105f4 Update flutter_webrtc (#48)
Also update video constraints to use modern constraint syntax
2021-12-07 00:46:03 +09:00
Hiroshi Horie e06936de2d sort imports
`flutter pub run import_sorter:main --no-comments`
2021-12-05 13:44:14 +07:00
Hiroshi Horie df33560426 CameraPosition docs 2021-12-05 10:59:42 +07:00
Hiroshi Horie 36173eb3c6 more docs 2021-12-03 11:47:47 +07:00
Hiroshi Horie 2cd3198cdd organize track & pub to directory 2021-11-30 17:29:18 +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
davidliuandGitHub c71bcaeaf8 Default mic settings (#37) 2021-11-29 20:42:26 +09:00
davidliuandGitHub c50e0269cf Use min for width/height to apply constraints (#35) 2021-11-26 15:03:38 +09:00
Hiroshi Horie f9c2622b4e fix updateTrack bug 2021-11-22 21:26:18 +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 Horie e3879d6025 format 2021-11-11 00:26:48 +09:00
Hiroshi Horie a5d9620cba Merge branch 'main' of https://github.com/livekit/client-sdk-flutter 2021-11-11 00:21:17 +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 Horie f3fad79793 more logging 2021-11-10 03:18:42 +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 a7ff6e951a emit TrackStreamUpdatedEvent 2021-10-27 18:38:31 +09:00
Hiroshi Horie 4779b3306c dispose previous stream also 2021-10-26 23:29:08 +09:00
Hiroshi Horie 18d12613f6 change restartTrack sequence 2021-10-26 23:25:11 +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 Horie 330338afbd don't disable audio tracks 2021-10-26 00:44:44 +09:00
Hiroshi Horie 8c10a39ed0 _disabled to _enabled 2021-10-25 23:31:44 +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 6a43f3394c call dispose on pub and track 2021-10-22 23:14:26 +09:00
Hiroshi Horie 4b29534e95 remove mute/unmute from example 2021-10-22 03:06:24 +09:00
Hiroshi HorieandGitHub 8cd8edb617 Fix track subscribe (#20)
* fixed

* format

* set track to null

* rearrange
2021-10-21 06:14:21 +09:00
Hiroshi Horie 31bb32f405 change defaults to support voice isolation 2021-10-03 23:05:38 +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 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 4960459c07 Explicit type for listeners (#11) 2021-09-28 15:31:54 +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