Help enabling camera from playcanvas?

Hi devs!
I can’t to acces to camera.
Im using the next script in playcanvas for use mediapipe, i used the Html Live Updates Template and only i edited the html asset. This html works fine enabling camera but like has some probles of permission in playcanvas.


      <div class="column">
        <article class="panel is-info">
          <p class="panel-heading">
            Webcam Input
          </p>
          <div class="panel-block">
            <video class="input_video4"></video>
          </div>
        </article>
      </div>

      <!-- OUTPUT -->
      <div class="column">
        <article class="panel is-info">
          <p class="panel-heading">
          
          </p>
          <div class="panel-block">
            <canvas class="output4" width="480px" height="480px"></canvas>
          </div>
        </article>
      </div>
    </div>
    

Hi @Luis_Mb,

You need to drive the logic through JavaScript to enable the camera from a PlayCanvas script.

Check this example of mine where I enable the web camera to render it on a texture:

https://playcanvas.com/editor/scene/946787