mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-31 13:25:40 +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:
		| @@ -107,6 +107,17 @@ Future<void> playAudioFile(String path) async { | ||||
|   } | ||||
|  | ||||
|   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)); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user