Resource Base
Table of contents


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;


Event triggered whenever there is a change in the image source’s state.

onImageSourceStateReceived?: (state: EnumImageSourceState) => void;


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


Code snippet

let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
let imageSourceStateListener = {
    onImageSourceStateReceived(state) {
        console.log("Image Source State: ", state);

See Also

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(2.2.30)
    • Version 2.x
      • Version 2.2.10
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support