package
A live video editor for the web!
npm install jumpstreamerGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Live broadcasting and recording software for the web, inspired by OBS.
<script src="jumpstreamer.js"></script><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>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]
}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)
})
}
}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!
Estimated unpacked size across 21 packages.
4.6 MB
Includes dependencies.
7 direct · 3 outdated
^3.1.1
4.1.0
^1.0.0
4.0.0
^2.0.3
2.0.4
^1.2.8
1.10.28
^2.0.2
2.0.2
^2.0.1
2.0.1
^2.0.5
4.0.1