This project enables streamers to broadcast their camera feed directly into the viewer's augmented reality (AR) scene, utilizing WebXR and JavaScript.
This document provides instructions for setting up and running the project on both the server and client sides.
To install the necessary dependencies, run the following command in your terminal:
npm install
To start the server, execute:
node index.js
This project uses A-Frame for displaying AR content. Except when accessed from localhost, the server must be run over a certified HTTPS connection. To achieve a certified SSL setup, it is recommended to use ngrok.
After downloading and setting up ngrok, create a remote HTTPS server by running:
ngrok http 3006
To access the project from a PC:
- Open a web browser (Chrome is preferred).
- Navigate to
localhost:3006
. - An alert will appear asking if you're a streamer. Select
OK
to proceed, indicating that you're streaming from the computer.
To run the app on mobile phones:
- Open a web browser (Chrome is preferred).
- Enter the HTTPS link provided in the
Forwarding
section generated by ngrok into the browser's URL bar. - You will encounter an alert asking if you're a streamer. Choose
Cancel
to proceed as a viewer. - Allow the required permissions, and you'll be able to view the AR scene.