mirror of
https://github.com/ente-io/ente.git
synced 2025-05-27 13:09:56 +00:00
17 lines
516 B
Dart
17 lines
516 B
Dart
import "package:flutter/services.dart";
|
|
import "package:logging/logging.dart";
|
|
|
|
class AudioSessionHandler {
|
|
static final _logger = Logger("AudioSessionHandler");
|
|
static const MethodChannel _channel =
|
|
MethodChannel('io.ente.frame/audio_session');
|
|
|
|
static Future<void> setAudioSessionCategory() async {
|
|
try {
|
|
await _channel.invokeMethod('setAudioSessionCategory');
|
|
} on PlatformException catch (e) {
|
|
_logger.warning("Failed to set audio session category: '${e.message}'.");
|
|
}
|
|
}
|
|
}
|