Skip to content

https config to test in VR with the ip #48

@vincentfretin

Description

@vincentfretin

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 networked-aframe/naf-valid-avatars@a4479b6 where I actually use the self-signed certificate generated by webpack dev server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Planned

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions