c-frame / aframe-gltf-model-plus

gltf-model-plus component to load glb file with hubs extensions
https://c-frame.github.io/aframe-gltf-model-plus/
Mozilla Public License 2.0
10 stars 4 forks source link

https config to test in VR with the ip #48

Open vincentfretin opened 1 month ago

vincentfretin commented 1 month ago

navigator.mediaDevices is undefined on non secure context. Secure context is https or localhost 127.0.0.1. You'll get the following error if you use your ip 192.168.1.15 for example and connect to test multi-users:

networked-aframe.min.js:1 TypeError: Cannot read properties of undefined (reading 'getUserMedia')
    at h.value (networked-aframe.min.js:1:32361)
    at networked-aframe.min.js:1:27572
    at new Promise (<anonymous>)
    at h.value (networked-aframe.min.js:1:27543)
    at t.value (networked-aframe.min.js:1:10214)
    at n.connect (networked-aframe.min.js:1:74489)
    at v.emit (a-node.js:293:10)
    at HTMLButtonElement.onclick (index.html:222:36) 'failure to connect

Add a commented config to run on https or maybe enable it via an environment variable and use a specific command npm run start:https See https://github.com/networked-aframe/naf-valid-avatars/commit/a4479b6df741b346283a8d1943b268b9710a9a68 where I actually use the self-signed certificate generated by webpack dev server.