MuxLabs / wocket

Example of streaming to an RTMP endpoint from a browser via WebSockets

Home Page:https://ws.mux.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unhandled Runtime Error TypeError: Cannot read property 'getUserMedia' of undefined

shelomito12 opened this issue · comments

I'm getting this error when accessing the webpage for the first time

image

output when running npm run dev command (on Ubuntu 18.04):

$ npm run dev                

> custom-server@1.0.0 dev /home/ubuntu/wocket
> nodemon server.js

[nodemon] 2.0.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node server.js`
event - compiled successfully
> Ready on port 8055
event - build page: /next/dist/pages/_error
wait  - compiling...
event - compiled successfully
event - build page: /
wait  - compiling...
event - compiled successfully

nodejs version:

$ nodejs -v
v14.3.0

npm version:

$ npm -v
6.14.5

Full Call StacK:

Call Stack
tryCatch
node_modules/regenerator-runtime/runtime.js (45:14)
Generator.invoke [as _invoke]
node_modules/regenerator-runtime/runtime.js (274:0)
Generator.prototype.<computed> [as next]
node_modules/regenerator-runtime/runtime.js (97:0)
asyncGeneratorStep
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (3:0)
_next
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (25:0)
eval
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (32:0)
new Promise
<anonymous>
eval
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (21:0)
enableCamera
pages/index.js (25:20)
HTMLUnknownElement.callCallback
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (440:14)
Object.invokeGuardedCallbackDev
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (489:16)
invokeGuardedCallback
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (544:31)
invokeGuardedCallbackAndCatchFirstError
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (558:25)
executeDispatch
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (641:3)
executeDispatchesInOrder
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (666:5)
executeDispatchesAndRelease
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3530:5)
executeDispatchesAndReleaseTopLevel
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3539:10)
forEachAccumulated
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3511:8)
runEventsInBatch
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3556:3)
runExtractedPluginEventsInBatch
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3766:3)
handleTopLevel
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3810:5)
batchedEventUpdates$1
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (22123:12)
batchedEventUpdates
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (1047:12)
dispatchEventForLegacyPluginEventSystem
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (3820:5)
attemptToDispatchEvent
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (4519:5)
dispatchEvent
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (4441:19)
unstable_runWithPriority
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (28281:12)
runWithPriority$1
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (11291:10)
discreteUpdates$1
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (22139:12)
discreteUpdates
file:///home/ubuntu/wocket/.next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (1058:12)
dispatchDiscreteEvent
/_next/static/development/dll/dll_f9de5cbc314a1e41f91e.js (4420:3)

I'm trying to access on Chrome version 83.0.4103.61 (Official Build) (64-bit) on Windows 10

Seems to be a security issue with Chrome (not SSL enabled on remote server) -> ant-media/Ant-Media-Server#1200 (comment)

It works on Firefox browser.

Yup, deploying DNS + SSL, I was able to successfully enable my cam+mic on Chrome.