ImageSourceStateListener
The ImageSourceStateListener
interface provides a standardized way for monitoring changes in the state of an image source. Utilizing an event-driven design, it features the event onImageSourceStateReceived
, which is triggered whenever there is a change in the image source’s state.
interface ImageSourceStateListener {
onImageSourceStateReceived?: (state: EnumImageSourceState) => void;
}
onImageSourceStateReceived
Event triggered whenever there is a change in the image source’s state.
onImageSourceStateReceived?: (state: EnumImageSourceState) => void;
Parameters
state
: This parameter indicates the current state of the image source, using the EnumImageSourceState
type. This enumeration defines various possible states of an image source.
Return Value
None.
Code snippet
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
let imageSourceStateListener = {
onImageSourceStateReceived(state) {
console.log("Image Source State: ", state);
}
}
router.
See Also