Skip to content

Commit

Permalink
Merge branch 'fix/set-x-google-start-bitrate-for-svc' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/livekit/client-sdk-flutter into fix/set-x-google-start-bitrate-for-svc
  • Loading branch information
cloudwebrtc committed Sep 14, 2023
2 parents 4815aef + 308488f commit 75c276f
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: deploy web on github-page
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit_secret}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- run: flutter config --enable-web
- run: flutter clean
- run: flutter pub get
- run: |
cd example
flutter build web --release --web-renderer html --base-href /client-sdk-flutter/
cd build/web
git init
git config --global user.email [email protected]
git config --global user.name cloudwebrtc
git status
git remote add origin https://${{secrets.commit_secret}}@github.com/livekit/client-sdk-flutter.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ And call the following code after launching your app for the first time.
```dart
import 'package:permission_handler/permission_handler.dart';
Future<void> _checkPremissions() async {
Future<void> _checkPermissions() async {
var status = await Permission.bluetooth.request();
if (status.isPermanentlyDenied) {
print('Bluetooth Permission disabled');
Expand All @@ -142,11 +142,38 @@ Future<void> _checkPremissions() async {
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await _checkPremissions();
await _checkPermissions();
runApp(MyApp());
}
```

#### Audio Modes

By default, we use the `communication` audio mode on Android which works best for two-way voice communication.

If your app is media playback oriented and does not need the use of the device's microphone, you can use the `media`
audio mode which will provide better audio quality.

```dart
import 'package:flutter_webrtc/flutter_webrtc.dart' as webrtc;
Future<void> _initializeAndroidAudioSettings() async {
await webrtc.WebRTC.initialize(options: {
'androidAudioConfiguration': webrtc.AndroidAudioConfiguration.media.toMap()
});
webrtc.Helper.setAndroidAudioConfiguration(
webrtc.AndroidAudioConfiguration.media);
}
void main() async {
await _initializeAudioSettings();
runApp(const MyApp());
}
```

Note: the audio routing will become controlled by the system and cannot be manually changed with functions like
`Hardware.selectAudioOutput`.

### Desktop support

In order to enable Flutter desktop development, please follow [instructions here](https://docs.flutter.dev/desktop#set-up).
Expand Down
2 changes: 1 addition & 1 deletion example/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
<base href="$FLUTTER_BASE_HREF">

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ dependencies:
git:
url: https://github.com/flutter-webrtc/flutter-webrtc.git
ref: feat/support-scalability-mode

flutter_window_close: ^0.2.2
device_info_plus: ^9.0.0
js: ^0.6.4
Expand Down

0 comments on commit 75c276f

Please sign in to comment.