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

rtc

v3.4.0

Published

Build WebRTC conferencing applications with easy using rtc.io. This package provides a super-friendly entry point for working with WebRTC, dive into underling rtc.io modules for more configuration and customization opportunities

Downloads

188

Readme

rtc

This is a package that will provide you a "one-stop shop" for building WebRTC applications. It aggregates together a variety of packages (primarily from the rtc.io suite) to deliver a single package for building a WebRTC application.

NPM

Build Status unstable bitHound Score Gitter chat

Getting Started

Probably the easiest way to get started with RTC is to take it for a testdrive using jsbin. This demo uses the minified JS file (and associated sourcemaps for debugging) from:

//cdn.jsdelivr.net/rtc/latest/rtc.min.js

If you wish to use a specific version, then you can replace latest with the version number (from 3.0.1 onwards):

//cdn.jsdelivr.net/rtc/3.2.3/rtc.min.js

Package Managers FTW!

I'd recommend using a package manager if you aren't already and here are the relevant instructions for installing RTC from a number of popular options:

  • npm: npm install rtc --save
  • bower: bower install rtc-io/rtc

Basic Usage

Establish a connection and render local and remote video feeds.

<html>
<head>
<title>rtc.io simple conferencing</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
<link rel="stylesheet" href="layout.css">
</head>
<body onload="RTC()" class="pure-g">
    <div class="pure-u-1-5">
        <div id="l-video"></div>
    </div>
    <div class="pure-u-4-5" id="r-video"></div>
<script src="https://cdn.jsdelivr.net/rtc/latest/rtc.min.js"></script>
</body>
</html>

In this example, the default configuration options are used for configuration, which are displayed below for informational purposes:

// a default configuration that is used by the rtc package
module.exports = {
  // simple constraints for defaults
  constraints: {
    video: true,
    audio: true
  },

  // use the public switchboard for signalling
  signaller: 'https://switchboard.rtc.io',

  // no room is defined by default
  // rtc-quickconnect will autogenerate using a location.hash
  room: undefined,

  // specify ice servers or a generator function to create ice servers
  ice: [],

  // any data channels that we want to create for the conference
  // by default a chat channel is created, but other channels can be added also
  // additionally options can be supplied to customize the data channel config
  // see: <http://w3c.github.io/webrtc-pc/#idl-def-RTCDataChannelInit>
  channels: {
    chat: true
  },

  // the selector that will be used to identify the localvideo container
  localContainer: '#l-video',

  // the selector that will be used to identify the remotevideo container
  remoteContainer: '#r-video',

  // should we atempt to load any plugins?
  plugins: [],

  // common options overrides that are used across rtc.io packages
  options: {}
};

Diving Deeper

If there is a specific application that you are looking to build with rtc.io feel free to open an issue and outline a few of your requirements (video, audio, data, etc) and we can give you some advice. In most cases, the following is a good rule of thumb for working our where you should jump in with rtc.io packages.

  • Video and/or audio is crucial to my application and I haven't done a lot of work with browserify

    Use the rtc distribution files from the CDN, and build your app

  • I feel comfortable using browserify, and find it a great way of building apps.

    Configure your application using npm, and start by including the rtc package (npm install --save rtc). If you need more flexibility than what is offered through this package, take something like rtc-quickconnect for a spin.

  • I am building something that isn't really media related, and just want to play with data channels.

    You are going to want to use rtc-quickconnect and we'd strongly recommend getting comfortable with browserify if you aren't already as it's going to make your life a lot easier.

Other Simple Demos / Tutorials

License(s)

Apache 2.0

Copyright 2014-2015 National ICT Australia Limited (NICTA)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.