Error to get camera feed within Dash

Hi,

I am trying to get a camera feed on html.Video tag, and it gives me the following error.

Failed to acquire camera feed: TypeError: Cannot set property 'srcObject' of undefined

I have placed my JS as required within the assets folder. The equivalent setup in Flask and HTML5 works well. I need it to work within Dash as well, what to do? Thanks!

Any insights on the above question? Thank you.