diff --git a/README.md b/README.md index 28be533f9..a7d1c594b 100644 --- a/README.md +++ b/README.md @@ -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 🔍 diff --git a/apps/web/src/app/settings/settings-playback-section.component.html b/apps/web/src/app/settings/settings-playback-section.component.html index 19d1d518e..76494e5e6 100644 --- a/apps/web/src/app/settings/settings-playback-section.component.html +++ b/apps/web/src/app/settings/settings-playback-section.component.html @@ -148,7 +148,7 @@ } - @if (form().value.player === 'mpv') { + @if (isDesktop() && form().value.player === 'mpv') {

{{ 'SETTINGS.MPV_PLAYER_PATH_LABEL' | translate }}

@@ -187,7 +187,7 @@
} - @if (form().value.player === 'vlc') { + @if (isDesktop() && form().value.player === 'vlc') {

{{ 'SETTINGS.VLC_PLAYER_PATH_LABEL' | translate }}

diff --git a/apps/web/src/app/settings/settings-playback-section.component.spec.ts b/apps/web/src/app/settings/settings-playback-section.component.spec.ts index 5da13c693..77fefc620 100644 --- a/apps/web/src/app/settings/settings-playback-section.component.spec.ts +++ b/apps/web/src/app/settings/settings-playback-section.component.spec.ts @@ -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();