Heads up! We're sunsetting this forum to streamline our community space.

join us on Discord for support, updates, and all things Snap AR! See you there!
Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Camera kit Start recording

Hi there.
i was wandering by using Camera Kit web SDK if i can enable start recording feature.
is there a simple code or something you can help me with ?
Thank you.

Tagged:

Answers

  • stevenxu
    stevenxu Posts: 612 👻

    @كنز | Treasure👑

    Thanks for posting on the forum! Created a ticket (4797) for our eng team to chime in when they get a chance.

  • Michael Mase
    Michael Mase Posts: 66 🔥🔥

    Hi @كنز | Treasure👑! Camera Kit renders to an HTMLCanvasElement which can be recorded through a couple different methods. Unfortunately, we don't have any documentation on this at the moment but plan to have some sample material available in the near future. In the meantime, I will refer you to the MediaRecorder API docs; which is what would ultimately be used to achieve this desired functionality: https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder.

    If you have any additional questions, please feel free to reach out!

  • Hi @Michael Mase Thank you so much,
    The lenses we are working with are structured to run with “ on start record “ inside the lens
    If im just recording the html frame the lens will never start the functions inside it.
    Is there an actual start recording code that run the same way when you click on record button on snap?
    Thank you
    Cheers.

  • Michael Mase
    Michael Mase Posts: 66 🔥🔥

    Excellent question! At this time, ScriptScene methods like isRecording are not supported in the Web SDK. The best approach to something like this may be to trigger a click event on the canvas element when the user begins recording. In your Lens, you would initiate the sequence you wish to record when the user taps/clicks. I hope this helps!

Categories