Skip to content

Commit 2470874

Browse files
authored
Merge pull request #39 from yosemiteyss/feat/update-1.2.5
update version to 1.2.5
2 parents f5d70a6 + eee071d commit 2470874

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.2.5
2+
* Added `getAndroidAudioStream` method.
3+
* Added `getIOSAudioSessionCategory` method.
4+
* Updated flutter_plugin_android_lifecycle plugin to 2.0.9.
5+
16
## 1.2.4
27
* Added `setIOSAudioSessionCategory` method.
38
* Added `category` option to `addListener` method.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ await FlutterVolumeController.toggleMute();
8181
await FlutterVolumeController.setAndroidAudioStream(stream: AudioStream.system);
8282
```
8383

84+
### Get Audio Stream on Android
85+
- Get the current audio stream on Android.
86+
```dart
87+
final stream = await FlutterVolumeController.getAndroidAudioStream();
88+
```
89+
8490
#### Set Audio Session Category on iOS
8591
- Adjusts to a different set of audio behaviors.
8692
- Supported categories: `AudioSessionCategory.ambient`, `AudioSessionCategory.multiRoute`, `AudioSessionCategory.playAndRecord`, `AudioSessionCategory.playback`, `AudioSessionCategory.record`, `AudioSessionCategory.soleAmbient`
@@ -89,6 +95,12 @@ await FlutterVolumeController.setAndroidAudioStream(stream: AudioStream.system);
8995
await FlutterVolumeController.setIOSAudioSessionCategory(category: AudioSessionCategory.playback);
9096
```
9197

98+
#### Get Audio Session Category on iOS
99+
- Get the current audio session category on iOS.
100+
```dart
101+
final category = await FlutterVolumeController.getIOSAudioSessionCategory();
102+
```
103+
92104
#### Listen for Volume Changes
93105
- Use `emitOnStart` to control whether volume level should be emitted immediately right after the listener is attached.
94106
```dart

lib/src/flutter_volume_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class FlutterVolumeController {
200200
}
201201
}
202202

203-
/// Get the current audio session category on IOS.
203+
/// Get the current audio session category on iOS.
204204
static Future<AudioSessionCategory?> getIOSAudioSessionCategory() async {
205205
if (Platform.isIOS) {
206206
final index = await methodChannel

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_volume_controller
22
description: A Flutter plugin to control system volume and listen for volume changes on different platforms.
3-
version: 1.2.4
3+
version: 1.2.5
44
homepage: https://github.com/yosemiteyss/flutter_volume_controller
55

66
environment:

0 commit comments

Comments
 (0)