Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Using a WebCam in AEM 6.5 components

Avatar

Level 4

Here, we are trying to include a webcam through HTML attached below. 

<div id="interactive" class="viewport scanner">

     <video></video>
      <canvas class="drawingBuffer"></canvas>

</div>

And we have added the below plugin for using this video tag. 

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js"></script>  
<script src="https://cdn.jsdelivr.net/npm/@carloscgo/vue-cc-quaggajs@2.0.0/dist/vue-quagga.js"></script>  
<script src="https://cdn.rawgit.com/serratus/quaggaJS/0420d5e0/dist/quagga.min.js"></script>

But in the component, in place of Webcam, there is a blank space displaying.
There are no console errors relating to this.

kirthi_murali_0-1666939087239.png

(Although the code works perfectly fine with Webcam turning on outside AEM when we tested separately in HTML template.)

Is there any other way to trigger the Webcam on the component? Or am I missing anything here?

2 Replies

Avatar

Level 7

It seems your project works with html and javascript. Can you check browsers console? May there is a cross browser policy that prevents component functionality.

Avatar

Level 4

@Magicr , there is no warning related to cross-browser policy in console.

kirthi_murali_0-1666947531147.png