-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit: adding mediastream.js and examples
- Loading branch information
Luke McKeen
committed
Nov 14, 2016
0 parents
commit 68d80f1
Showing
18 changed files
with
1,569 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory" : "components" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docs | ||
components | ||
node_modules | ||
.grunt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = function(grunt) | ||
{ | ||
require('library-grunt')(grunt, { | ||
themePath: '../SpringRollTheme' | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
Oops, something went wrong.