feat: add tunneled playback setting + frame watchdog for HDR black screen

Adds a user-facing toggle for MediaCodec tunneling (Android/ExoPlayer)
and a rendered-frame watchdog that auto-falls back to MPV when ExoPlayer
produces 0 video frames after 8 seconds of audio playback.
This commit is contained in:
edde746
2026-03-01 04:02:36 +01:00
parent 1d739c74ec
commit d0f2122944
24 changed files with 171 additions and 5 deletions
@@ -10,6 +10,7 @@ class PlayerAndroid extends PlayerBase {
static const _eventChannel = EventChannel('com.plezy/exo_player/events');
int? _bufferSizeBytes;
bool _tunnelingEnabled = true;
@override
MethodChannel get methodChannel => _methodChannel;
@@ -50,6 +51,7 @@ class PlayerAndroid extends PlayerBase {
try {
final result = await methodChannel.invokeMethod<bool>('initialize', {
'bufferSizeBytes': _bufferSizeBytes,
'tunnelingEnabled': _tunnelingEnabled,
});
initialized = result == true;
if (!initialized) {
@@ -188,6 +190,9 @@ class PlayerAndroid extends PlayerBase {
case 'demuxer-max-bytes':
_bufferSizeBytes = int.tryParse(value);
break;
case 'tunneled-playback':
_tunnelingEnabled = value != 'no';
break;
// Other properties are no-ops for ExoPlayer
}
}