I am currently trying to use the WebRTC api and have everything working locally.
When I deploy to surge.sh
I lose access to the navigator.mediaDevices
object. How can I resolve this?
The following line of code is where I am having trouble with.
const stream = await navigator.mediaDevices.getDisplayMedia({video: {mediaSource: 'screen'}});
I receive the following error message:
TypeError: Cannot read property 'getDisplayMedia' of undefined