Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/js/components/preact/HLSVideoCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function HLSVideoCell({

useEffect(() => {
setPrivacyActive(!!stream.privacy_mode);
}, [stream.privacy_mode]);
}, [streamId, stream.privacy_mode]);

// HLS source state: 'go2rtc' (go2rtc's dynamic HLS), 'native' (lightNVR FFmpeg-based HLS), or 'failed'
// Default to native lightNVR HLS (reliable, always running when streaming enabled)
Expand Down
17 changes: 17 additions & 0 deletions web/tests/e2e/hlsRecovery.browser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,23 @@ it('ignores an old privacy response after the tile changes streams',async()=>{
} finally {await browser.close();}
});

it('resets local privacy state when a different stream has the same server flag',async()=>{
const {browser,page}=await openPlayer({enabled:true,showControls:true});
try {
await page.locator('button[aria-label="live.pauseForPrivacy"]').click();
await page.locator('.btn-primary').click();
await page.locator('button[aria-label="live.resumeStream"]').waitFor({state:'visible'});
await page.evaluate(()=>{
window.config.streamName='second camera';
window.config.streamId='second';
window.mount();
});
await page.locator('button[aria-label="live.resumeStream"]').waitFor({state:'detached'});
expect(await page.evaluate(()=>document.querySelector('.video-cell')?.dataset.streamName)).toBe('second camera');
expect(await page.evaluate(()=>window.errors)).toEqual([]);
} finally {await browser.close();}
});

it('resets fallback transport when the tile receives a different stream',async()=>{
const {browser,page}=await openPlayer({enabled:false});
try {
Expand Down
Loading