Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

ARCHIVED Networked-Aframe adapter for native WebRTC channels. A more recent version is in the networked-aframe repository.

License

Notifications You must be signed in to change notification settings

networked-aframe/naf-webrtc-adapter

Repository files navigation

Networked-AFrame Native WebRTC Adapter

Network adapter for networked-aframe that uses uws for signalling and native WebRTC APIs for the WebRTC channels.

Running the Example

git clone https://github.com/networked-aframe/naf-native-webrtc-adapter
cd naf-native-webrtc-adapter
npm install # or use yarn
npm run dev # Start the local development server

With the server running, browse the example at http://localhost:8080. Open another browser tab and point it to the same URL to see the other client.

Running on Glitch.com

Remix on Glitch

Running your own server

You can deploy the included websocket server to Heroku using the button below.

Deploy

Then include and configure naf-uws-adapter.

<html>
<head>
  <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
  <script src="https://unpkg.com/networked-aframe/dist/networked-aframe.min.js"></script>
  <!-- Include naf-uws-adapter *after* networked-aframe -->
  <script src="https://unpkg.com/naf-uws-adapter/dist/naf-uws-adapter.min.js"></script> 
</head>
<body>
    <!-- Set adapter to uws and serverURL to the url of your Heroku server. -->
   <a-scene networked-scene="
        adapter: native-webrtc;
        audio: true;
        serverURL: ws://localhost:8080;
    ">
  </a-scene>
</body>
</html>

About

ARCHIVED Networked-Aframe adapter for native WebRTC channels. A more recent version is in the networked-aframe repository.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published