Skip to content

Commit

Permalink
initial commit: adding mediastream.js and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke McKeen committed Nov 14, 2016
0 parents commit 68d80f1
Show file tree
Hide file tree
Showing 18 changed files with 1,569 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory" : "components"
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://EditorConfig.org
root = true

[**.js]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs
components
node_modules
.grunt
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
src
examples
.bowerrc
.editorconfig
.gitignore
bower.json
Gruntfile.js
library.json
6 changes: 6 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(grunt)
{
require('library-grunt')(grunt, {
themePath: '../SpringRollTheme'
});
};
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
MediaStream is a plugin for [SpringRoll](http://github.com/SpringRoll/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.

```bash
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.

```bash
grunt examples
```

##Usage

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

```javascript
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();
}

```
31 changes: 31 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "springroll-mediastream",
"version": "1.0.0",
"main": "dist/mediastream.min.js",
"dependencies": {
"springroll": "^0.4.25",
"webrtc-adapter": "~2.0.0"
},
"devDependencies": {
"easeljs": "https://github.com/SpringRoll/EaselJS.git",
"tweenjs": "https://github.com/SpringRoll/TweenJS.git",
"google-code-prettify": "*",
"bind-polyfill": "*"
},
"ignore": [
"Gruntfile.js",
"tasks",
"examples",
"docs",
"src",
"test",
"tools",
".bowerrc",
".editorconfig",
".travis.yml",
".gitattributes",
"library.json",
"package.json",
".gitignore"
]
}
Loading

0 comments on commit 68d80f1

Please sign in to comment.