feat(settings): add shared web player controls toggle (#1198)

* docs(playback): design shared controls setting

* docs(playback): plan shared controls setting

* feat(settings): persist shared web controls preference

* test(settings): harden shared controls normalization coverage

* feat(settings): expose shared web controls toggle

* fix(settings): label shared controls toggle

* feat(playback): resolve shared controls from settings

* test(playback): cover shared controls setting

* docs(playback): document shared controls preference

* fix(playback): await settings before host creation

* fix(settings): normalize shared controls updates
This commit is contained in:
4gray authored and GitHub committed 2026-07-17 13:38:06 +02:00
1 parent 48e3736460
commit beb62db314
38 files changed
+1863 -300

No files matched your search

@@ -169,6 +169,11 @@ test.describe('Electron Settings', () => {
'select-video-player',
'html5'
);
const sharedControlsCheckbox = firstLaunch.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]');
await expect(sharedControlsCheckbox).toBeVisible();
await sharedControlsCheckbox.check();
await selectSettingsOption(
firstLaunch.mainWindow,
'select-stream-format',
@@ -206,6 +211,11 @@ test.describe('Electron Settings', () => {
await expect(
secondLaunch.mainWindow.getByTestId('select-video-player')
).toContainText(/HTML5/i);
await expect(
secondLaunch.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]')
).toBeChecked();
await expect(
secondLaunch.mainWindow.getByTestId('select-stream-format')
).toContainText('ts');
@@ -231,6 +241,49 @@ test.describe('Electron Settings', () => {
}
});
test('@settings @playback @electron applies shared controls to the next HTML5 session', async ({
dataDir,
}) => {
const app = await launchElectronApp(dataDir);
try {
await openSettings(app.mainWindow);
await selectSettingsOption(
app.mainWindow,
'select-video-player',
'html5'
);
const sharedControlsCheckbox = app.mainWindow
.getByTestId('web-player-shared-controls-setting')
.locator('input[type="checkbox"]');
await expect(sharedControlsCheckbox).toBeVisible();
await sharedControlsCheckbox.check();
await saveSettings(app.mainWindow);
await goToDashboard(app.mainWindow);
await importM3uPlaylistFromNativeDialog(app, m3uFixturePath);
await app.mainWindow.waitForURL(/\/workspace\/playlists\/.+/);
const firstChannel = channelItemByTitle(
app.mainWindow,
'Channel 1'
).first();
await expect(firstChannel).toBeVisible({ timeout: 20000 });
await firstChannel.click();
await expect(
app.mainWindow.locator(
'app-html-video-player app-player-controls'
)
).toBeVisible();
await expect(
app.mainWindow.locator('app-html-video-player video[controls]')
).toHaveCount(0);
} finally {
await closeElectronApp(app);
}
});
test('@settings @persistence @electron persists the EPG view mode across app restart', async ({
dataDir,
}) => {