npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

naf-janus-adapter

v4.0.1

Published

networked-aframe Janus network adapter

Downloads

33

Readme

Networked-AFrame Janus Adapter

npm

Network adapter for networked-aframe that uses the Janus WebRTC server as a backend.

Usage

naf-janus-adapter needs access to networked-aframe's NAF global variable. Include it after including networked-aframe but before the networked-scene is loaded.

Compatibility

naf-janus-adapter should support anything that supports recent WebRTC standards (right now, the RTPSender-based APIs for manipulating streams and tracks). At the time of this writing, that means that many browsers (e.g. Chrome) will require the use of the WebRTC adapter shim. If you're using NPM to build your A-Frame application, you should include webrtc-adapter as a dependency of your application; if you're using the browser distribution, you should include the WebRTC adapter prior to including naf-janus-adapter, as shown in the example code below.

Example

<html>
<head>
  <script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
  <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
  <script src="https://rawgit.com/netpro2k/networked-aframe/feature/register-adapter/dist/networked-aframe.js"></script>
  <script src="https://unpkg.com/naf-janus-adapter/dist/naf-janus-adapter.min.js"></script>
</head>
<body>
   <a-scene networked-scene="
        room: 1;
        audio: true;
        adapter: janus;
        serverURL: ws://localhost:8080;
      ">
  </a-scene>
</body>
</html>

Migrating to 4.0.0

4.0.0 allows the application to control when occupants are subscribed to. Occupants are no longer automatically subscribed to when they join. The application is now required to call syncOccupants and pass an array of occupantIds that it wants to subscribe to. This list should contain all occupantsIds that are currently desired to be subscribed to- including any that have already been subscribed to and want to continue to be so. Any occupants not on the list that are already subscribed to will be unsubscribed from.

NAF.connection.adapter.syncOccupants(arrayOfOccupantIds);

If you want to automatically subscribe to occupants on join, you may call syncOccupants with the availableOccupants array as the first arugument once.

NAF.connection.adapter.syncOccupants(NAF.connection.adapter.availableOccupants);

Development

  • Dev: npm run start
  • Build: npm run build
  • Release: npm run release