Interface CameraKitSourceSubscriber

When creating a CameraKitSource, passing a CameraKitSourceSubscriber allows logic to implemented which will run whenever that source is attached/detached from a CameraKitSession.

interface CameraKitSourceSubscriber {
    onAttach?: (
        source: CameraKitSource,
        lensCore: LensCore,
        reportError: (error: Error) => void,
    ) => void | Promise<void>;
    onDetach?: (reportError: (error: Error) => void) => void | Promise<void>;
}

Properties

Properties

onAttach?: (
    source: CameraKitSource,
    lensCore: LensCore,
    reportError: (error: Error) => void,
) => void | Promise<void>
onDetach?: (reportError: (error: Error) => void) => void | Promise<void>
MMNEPVFCICPMFPCPTTAAATR