2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-27 21:16:48 +00:00

Sounds fix (#583)

* Prevent notification sounds from pausing external media

- Closes https://github.com/inventree/inventree-app/issues/582

* Bump release notes

* Bump version number

* Update release notes
This commit is contained in:
Oliver 2024-12-17 17:46:48 +11:00 committed by GitHub
parent 09625c81e2
commit ea3410a3da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
### 0.17.2 - December 2024
---
- Prevent notification sounds from pause media playback
- Updated translations
### 0.17.1 - December 2024 ### 0.17.1 - December 2024
--- ---

View File

@ -107,6 +107,17 @@ Future<void> playAudioFile(String path) async {
} }
final player = AudioPlayer(); final player = AudioPlayer();
// Specify context options for the audio player
// Ref: https://github.com/inventree/inventree-app/issues/582
player.setAudioContext(AudioContext(
android: AudioContextAndroid(
usageType: AndroidUsageType.notification,
audioFocus: AndroidAudioFocus.none,
),
iOS: AudioContextIOS()
));
player.play(AssetSource(path)); player.play(AssetSource(path));
} }

View File

@ -1,7 +1,7 @@
name: inventree name: inventree
description: InvenTree stock management description: InvenTree stock management
version: 0.17.1+93 version: 0.17.2+94
environment: environment:
sdk: ">=2.19.5 <3.13.0" sdk: ">=2.19.5 <3.13.0"