better logging
This commit is contained in:
@@ -46,17 +46,17 @@ window.controls = {
|
|||||||
},
|
},
|
||||||
setAvailableOutputDevices(devices: OutputDevice[]): void {
|
setAvailableOutputDevices(devices: OutputDevice[]): void {
|
||||||
if (!setAvailableOutputDevices$.observed)
|
if (!setAvailableOutputDevices$.observed)
|
||||||
throw new Error("Output controls are disabled");
|
throw new Error("Output controls are disabled. No setAvailableOutputDevices$ observer");
|
||||||
setAvailableOutputDevices$.next(devices);
|
setAvailableOutputDevices$.next(devices);
|
||||||
},
|
},
|
||||||
setOutputDevice(id: string): void {
|
setOutputDevice(id: string): void {
|
||||||
if (!setOutputDevice$.observed)
|
if (!setOutputDevice$.observed)
|
||||||
throw new Error("Output controls are disabled");
|
throw new Error("Output controls are disabled. No setOutputDevice$ observer");
|
||||||
setOutputDevice$.next(id);
|
setOutputDevice$.next(id);
|
||||||
},
|
},
|
||||||
setOutputEnabled(enabled: boolean): void {
|
setOutputEnabled(enabled: boolean): void {
|
||||||
if (!setOutputEnabled$.observed)
|
if (!setOutputEnabled$.observed)
|
||||||
throw new Error("Output controls are disabled");
|
throw new Error("Output controls are disabled. No setOutputEnabled$ observer");
|
||||||
setOutputEnabled$.next(!enabled);
|
setOutputEnabled$.next(!enabled);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user