Skip to content

Commit

Permalink
add deviceReady event
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Feb 11, 2015
1 parent c859dfb commit e1dd265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Events for this plugin that are available on the video.js player instance:

| Event | Description |
| --- | --- |
| `deviceReady` | Triggered when the device is ready to use. |
| `deviceError` | Triggered when the user doesn't allow the browser to access the microphone. Check `player.deviceErrorCode` for the specific [error code](https://developer.mozilla.org/en-US/docs/NavigatorUserMedia.getUserMedia#errorCallback). |
| `startRecord` | Triggered when the user clicked the record button to start recording. |
| `stopRecord` | Triggered when the user clicked the stop button to stop recording. |
Expand Down
3 changes: 3 additions & 0 deletions src/js/videojs.record.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
{
this.stream = stream;

// forward to listeners
this.player().trigger('deviceReady');

// connect stream to recording engine
this.engine = new RecordRTC(this.stream, this.recordOptions);

Expand Down

0 comments on commit e1dd265

Please sign in to comment.