Skip to main content

Is it possible to set default camera for mobile (front or rear camera)?



  • Bane

    Hey Felipe,

    Can you tell us what SDK you are using? It would be different if you are using one of our native (mobile) SDKs and if you are using one of our web SDKs instead (in which case few additional things could impact it).

  • Felipe Costa

    Thanks for the reply,


    I am using Javascript SDK.

  • Bane

    Thank you for the question and the info Felipe :)

    The JS SDK will actually show you the little option (usually in the bottom left corner) that will allow you to switch the camera.

    Now with the JS SDK there is something important to mention, many things are up to the operating system to decide, our system can only ask for something specific like the camera.

    In this case you would use the parameter named camerafacefront. It is about to be published to our docs, so you will not be able to find it on the parameters page as of right now.


    <ziggeorecorder ziggeo-theme="modern"

    What it will try / use if possible is to have the face camera in use by default.

    By default this boolean attribute is set as false.

    You could also switch through a following function:


    * The same might not be allowed by all mobile operating systems and or mobile browsers.

    I would of course recommend the following setup of your application header:

    <link rel="stylesheet" href="" />
    <script src=""></script>
    var ziggeoApp = new ZiggeoApi.V2.Application({
    webrtc_streaming_if_necessary: true,
    webrtc_on_mobile: true,
    auth: true

    * Also the above parameter and method is only available on the latest r34 revision and the dev preview of r35 however not on any older revisions (including the "stable" tag)

    Now, the reason why I included the webrtc_streaming_if_necessary and webrtc_on_mobile is because this turns on the WebRTC on the mobile devices (if supported) allowing greater control of the camera than if mobile camera app gets activated.

    Hope this helps :)


Please sign in to leave a comment.