How to check if StageID is passed

Hi All,

One of our client has written the custom UI at their end.
For AR improvements, we made some changes and ask the client to pass the stageID while initializing the player.

Is there a way to check if they are passing it actually. something like threekit.player or threekit.api

Hi Prashant, I am not sure there is a built-in way to check for the stage ID. My initial thought would be to do some validation on the front-end. For example, store the embed parameters in a variable and check for the existence of a stageId parameter.

let params = {
        authToken: "01234567-89ab-cdef-0123-456789abcdef",
        el: document.getElementById("player"),',
        assetId: "e12a45f7-8b39-cd06-e12a-45f78b39cd06",
        showConfigurator: true,
        showAR: true
      }

if (params['stageId'] != undefined) {...}

Alternatively in the catalog item, you can select a default stage so you do not have to specify in an embed.
image

Thanks @Will . I will go with CI option to set the default stage .

1 Like