Search code examples
jqueryvideojs-record

videojs.record , trying to autostart the video


I am trying to autostart the camera in the browser(chrome) using the below API

https://github.com/collab-project/videojs-record

The problem is (like shown in the demo), it shows a icon and on click of that it start the camera. But I want to start it by default as soon as screen opens. I tried .start() method also tried .retrySnapshot() but they did not worked. Any pointer will be helpful. Thanks !

Demo https://collab-project.github.io/videojs-record/examples/video-only.html


Solution

  • Found the way. You have to call this function.

    player.record().getDevice();