fix: pass headers to mpv

This commit is contained in:
edde746
2025-12-23 19:54:05 +01:00
parent 743f2bb9f2
commit 47cb3f2614
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -402,6 +402,12 @@ class PlayerNative implements Player {
// Show the video layer
await _methodChannel.invokeMethod('setVisible', {'visible': true});
// Set HTTP headers for Plex authentication and profile
if (media.headers != null && media.headers!.isNotEmpty) {
final headerList = media.headers!.entries.map((e) => '${e.key}: ${e.value}').toList();
await setProperty('http-header-fields', headerList.join(','));
}
// Set start position if provided (must be set before loading file)
if (media.start != null && media.start!.inSeconds > 0) {
await setProperty('start', media.start!.inSeconds.toString());