Banuba WebAR JavaScript API Reference
    Preparing search index...

    Variable DomConst

    Dom: {
        render: (player: Player, container: string | HTMLElement) => void;
        unmount: (container: string | HTMLElement) => void;
    } = ...

    Type Declaration

    • render: (player: Player, container: string | HTMLElement) => void

      Renders the Player into the supplied container

      <div id="webar"></div>

      <!-- ... -->

      <script>
      // ...

      Dom.render(player, document.getElementById("webar"))
      // or
      Dom.render(player, "#webar")
      // or even
      Dom.render(player, "body")
      <script>
    • unmount: (container: string | HTMLElement) => void

      Removes a mounted Player from the supplied container

      Dom.unmount("#webar")