feat: Automatically recover from frozen live streams (#2569)
- Closes: #2099
This commit is contained in:
@@ -94,6 +94,7 @@ describe('Camera', () => {
|
||||
}),
|
||||
new GenericCameraManagerEngine(createHASSManager()),
|
||||
);
|
||||
expect(camera.isInitialized()).toBe(false);
|
||||
|
||||
const stateWatcher = mock<StateWatcherSubscriptionInterface>();
|
||||
await camera.initialize({
|
||||
@@ -101,6 +102,7 @@ describe('Camera', () => {
|
||||
capabilityOptions: { capabilities: createCapabilities({ trigger: true }) },
|
||||
});
|
||||
|
||||
expect(camera.isInitialized()).toBe(true);
|
||||
expect(stateWatcher.subscribe).toBeCalledWith(expect.any(Function), [
|
||||
'camera.foo',
|
||||
]);
|
||||
@@ -128,6 +130,7 @@ describe('Camera', () => {
|
||||
|
||||
expect(stateWatcher.subscribe).not.toBeCalled();
|
||||
expect(camera.getCapabilities()).toBeNull();
|
||||
expect(camera.isInitialized()).toBe(false);
|
||||
});
|
||||
|
||||
it('should set capabilities and use go2rtc metadata endpoint', async () => {
|
||||
|
||||
@@ -263,7 +263,7 @@ describe('FrigateCamera', () => {
|
||||
expect(camera.getConfig().frigate.client_id).toBe('remote_x');
|
||||
});
|
||||
|
||||
it('leaves client_id untouched when the camera entity is unavailable', async () => {
|
||||
it('falls back to "frigate" when the camera entity is unavailable', async () => {
|
||||
const camera = new FrigateCamera(
|
||||
createCameraConfig({
|
||||
camera_entity: 'camera.front_door',
|
||||
@@ -285,7 +285,7 @@ describe('FrigateCamera', () => {
|
||||
frigateEventWatcher: mock<FrigateEventWatcher>(),
|
||||
frigateReviewWatcher: mock<FrigateReviewWatcher>(),
|
||||
});
|
||||
expect(camera.getConfig().frigate.client_id).toBeUndefined();
|
||||
expect(camera.getConfig().frigate.client_id).toBe('frigate');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user