fix(android): restore ExoPlayer audio for tunneled decoded PCM
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user