No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
examples
src
.bowerrc
.editorconfig
.gitattributes
.gitignore
.npmignore
Gruntfile.js
README.md
bower.json
library.json
package.json

README.md

MediaStream is a plugin for SpringRoll. It is designed to make working with webcams and microphones easier. MediaStream includes capabilities for creating webcam and microphone streams, playing, pausing and muting said streams, and switching webcam inputs.

##Installation

MediaStream can be installed using Bower.

bower install springroll-mediastream

##Examples

To test the examples, run the grunt task examples. This will download any dependencies and automatically launch the examples in your browser.

grunt examples

##Usage

Include mediastream.min.js in your libraries js or html, after SpringRoll's core.min.js.

var MediaStream = include('springroll.MediaStream');

var options = {};
options.video = true;
options.audio = true;

var stream = new MediaStream(options);

stream.onLoad = function(data) 
{
	if (data.error) 
	{
		console.log(data.error);
		return;
	}

	var video = new Bitmap(data.video)

	display.stage.addChild(video);
	display.stage.update();
}