How to check if StageID is passed

Prashant
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 pa…

Comments

3 comments

  • Comment author
    Prashant

    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

    0
  • Comment author
    William Thompson

    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.

    0
  • Comment author
    Prashant

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

    0

Please sign in to leave a comment.