fix(settings): gate external player hints to desktop

This commit is contained in:
4gray committed 2026-05-12 19:12:06 +02:00
1 parent 13ec6b2291
commit 162a5da134
3 files changed
+36 -3

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ The application is a cross-platform, open-source project built with Electron and
- M3u and M3u8 playlist support 📺
- Radio playlist support with dedicated audio player 📻
- Xtream Code (XC) and Stalker portal (STB) support
- External player support - MPV and VLC; macOS accepts `mpv.app` / `VLC.app` bundle paths, while IINA can be launched through its executable path
- External player support - MPV and VLC; macOS accepts `mpv.app` / `VLC.app` bundle paths. IINA can be launched via its executable path on macOS (best-effort: controls and position polling are MPV IPC only)
- Add playlists from the file system or remote URLs 📂
- Automatic playlist updates on application startup
- Channel search functionality 🔍
@@ -148,7 +148,7 @@
</div>
}
@if (form().value.player === 'mpv') {
@if (isDesktop() && form().value.player === 'mpv') {
<div class="setting-item">
<div class="setting-item__meta">
<h4>{{ 'SETTINGS.MPV_PLAYER_PATH_LABEL' | translate }}</h4>
@@ -187,7 +187,7 @@
</div>
}
@if (form().value.player === 'vlc') {
@if (isDesktop() && form().value.player === 'vlc') {
<div class="setting-item">
<div class="setting-item__meta">
<h4>{{ 'SETTINGS.VLC_PLAYER_PATH_LABEL' | translate }}</h4>
@@ -159,6 +159,24 @@ describe('SettingsPlaybackSectionComponent', () => {
);
});
it('hides MPV path guidance and the IINA executable tip outside desktop builds', () => {
fixture.componentRef.setInput('form', createForm(VideoPlayer.MPV));
fixture.componentRef.setInput('isDesktop', false);
fixture.detectChanges();
expect(fixture.nativeElement.textContent).not.toContain(
MPV_PATH_DESCRIPTION
);
expect(fixture.nativeElement.textContent).not.toContain(
MPV_COMPATIBLE_PLAYER_TIP
);
expect(
fixture.nativeElement.querySelector(
'[data-test-id="mpv-compatible-player-tip"]'
)
).toBeNull();
});
it('shows VLC bundle guidance without the IINA tip for desktop VLC playback', () => {
fixture.componentRef.setInput('form', createForm(VideoPlayer.VLC));
fixture.componentRef.setInput('isDesktop', true);
@@ -177,6 +195,21 @@ describe('SettingsPlaybackSectionComponent', () => {
);
});
it('hides VLC path guidance outside desktop builds', () => {
fixture.componentRef.setInput('form', createForm(VideoPlayer.VLC));
fixture.componentRef.setInput('isDesktop', false);
fixture.detectChanges();
expect(fixture.nativeElement.textContent).not.toContain(
VLC_PATH_DESCRIPTION
);
expect(
fixture.nativeElement.querySelector(
'[data-test-id="mpv-compatible-player-tip"]'
)
).toBeNull();
});
it('does not show external-player path guidance for embedded players', () => {
fixture.componentRef.setInput('isDesktop', true);
fixture.detectChanges();