Skip to content

Commit d5a43b9

Browse files
authored
Merge pull request #1017 from jellyfin/settings_mpv_toggle
Add toggle to enable/disable mpv
2 parents c2536f3 + 21f8548 commit d5a43b9

2 files changed

Lines changed: 25 additions & 6 deletions

File tree

native/nativeshell.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,25 @@ const features = [
1616
"fileinput"
1717
];
1818

19-
const plugins = [
20-
'mpvVideoPlayer',
21-
'mpvAudioPlayer',
22-
'jmpInputPlugin',
23-
'jmpUpdatePlugin'
24-
];
19+
const getPlugins = () => {
20+
const basePlugins = [
21+
'jmpInputPlugin',
22+
'jmpUpdatePlugin'
23+
];
24+
25+
const mpvEnabled = jmpInfo.settings?.main?.enableMPV !== false;
26+
if (mpvEnabled) {
27+
return [
28+
'mpvVideoPlayer',
29+
'mpvAudioPlayer',
30+
...basePlugins
31+
];
32+
}
33+
34+
return basePlugins;
35+
};
36+
37+
const plugins = getPlugins();
2538

2639
// Plugins are bundled, return class directly
2740
for (const plugin of plugins) {

resources/settings/settings_description.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,12 @@
162162
"display_name": "Enable Windows Taskbar Integration",
163163
"default": true,
164164
"platforms": [ "windows" ]
165+
},
166+
{
167+
"value": "enableMPV",
168+
"display_name": "Enable MPV Player",
169+
"help": "Enables MPV player for video and audio playback. When disabled, Jellyfin Media Player will fall back to the browser's built-in HTML5 player. This setting requires an application restart to take effect.\n\nNote: Disabling MPV will lose advanced features like audio passthrough, hardware decoding options, and codec-specific settings.",
170+
"default": true
165171
}
166172
]
167173
},

0 commit comments

Comments
 (0)