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

jumpstreamer

v1.0.5

Published

A live video editor for the web!

Downloads

5

Readme

jumpstreamer

Standard - JavaScript Style Guide

Live broadcasting and recording software for the web, inspired by OBS.

Demo

install

<script src="jumpstreamer.js"></script>

usage

<div></div>
<script>
  var jump = new JumpStreamer('div') // Element or selector to place the UI
  
  jump.on('stream', function (stream) {
    // stream is the MediaStream output
  })
  jump.on('stopstream', function () {
    // called when the stream stops
  })
</script>

api

var jump = new JumpStreamer(element, [opts])

element is a HTMLElement or CSS selector string. The display will attempt to fit inside this element.

Optional opts is a configuration object that will override the following defaults:

{
  output: {
    width: 1200,  // resolution of the output stream
    height: 900,
    fps: 40       // frames per second of the output stream
  },
  injectStyles: true, // whether to inject the JumpStreamer css
  inputs: [array of input devices - see below]
}

adding input devices

There are several ways to get MediaStreams to use as input sources. To add your own, put an object inside the opts.inputs array that has the following format:

{
  name: 'Display Name of Device', // Can be anything, but it should be descriptive
  getStream: function (callback) {
    // This function should call "callback" with the following arguments
    callback(err, name, stream)  
      - "err" is any error thrown, null otherwise
      - "name" is the name of the source (usually the same as the device name)
      - "stream" is the input MediaStream
  }
}

For example, here is one of the default devices:

{
  name: 'Video Camera',
  getStream: function (callback) {
    getusermedia({audio:true, video:true}, function (err, stream) {
      callback(err, 'Video Camera', stream)
    })
  }
}

notes

jumpstreamer does not broadcast your video, it simply gives you an output MediaStream to do with as you wish.

You could send it over a WebRTC connection, record it as a file, send to to a proxy RTMP server, pipe it through FFMPEG... whatever!

todo

  • [ ] Audio mixer
  • [ ] Scene transitions
  • [ ] More output options