fix(android): restore ExoPlayer audio for tunneled decoded PCM

This commit is contained in:
edde746
2026-06-30 18:58:08 +02:00
parent 2d30686857
commit 28e6e349b3
37 changed files with 220 additions and 85 deletions
+13
View File
@@ -110,6 +110,19 @@ void main() {
expect(PlatformDetector.supportsAudioPassthrough(), isFalse);
});
test('audio passthrough defaults off on a non-Android-TV host and honors explicit writes', () async {
final settings = await SettingsService.getInstance();
// The Android-TV-on-ExoPlayer default-on branch depends on Platform.isAndroid,
// which is false (and unmockable) on the test host, so the default is off here.
expect(settings.read(SettingsService.audioPassthrough), isFalse);
await settings.write(SettingsService.audioPassthrough, true);
expect(settings.read(SettingsService.audioPassthrough), isTrue);
await settings.write(SettingsService.audioPassthrough, false);
expect(settings.read(SettingsService.audioPassthrough), isFalse);
});
test('forces external player off on Apple TV even when stored enabled', () async {
final settings = await SettingsService.getInstance();
await settings.write(SettingsService.useExternalPlayer, true);