Skip to main content

Is there a way to trigger to start and stop screen/video record from background using React?

Comments

1 comment

  • Bane

    Hi Nagaraj,

    The screen recording nor camera recording can not be started right away. It is considered that if the camera or screen access was possible without end-user interaction it would likely be used for bad purpose. At least this is how browser vendors saw this when considering the implementation.

    Of course there are many legit reasons why this is needed and I understand why you need it as well.

    So having that said, you will always need to show the option to allow access to camera, mic or desktop/screen.

    So in short it is just not possible to do it without asking.

    In terms of starting the recording or doing anything like that you can grab a reference to the embedding. The way to do it would be like so:

    <ZiggeoRecorder
        apiKey={apiToken}
        onRef={ref => (this.child = ref)}
    />

    You could then invoke any method you need over this.child as you would otherwise.

    Hope this helps :)

    Regards,
    Bane

    0

Please sign in to leave a comment.