Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
update to version 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuochun committed Sep 20, 2013
1 parent e4cfd2a commit bf26ed5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
19 changes: 17 additions & 2 deletions dist/RecordRTC-together.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,7 @@ function StereoAudioRecorder(mediaStream, root) {
requestAnimationFrame = win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame,
cancelAnimationFrame = win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame,
URL = win.URL || win.webkitURL,
MediaStream = win.webkitMediaStream,
AudioContext = win.webkitAudioContext || window.mozAudioContext,
AudioContext = win.AudioContext || win.webkitAudioContext;

// defaults
defaults = {
Expand Down Expand Up @@ -652,6 +651,12 @@ function StereoAudioRecorder(mediaStream, root) {
this.audioStarted = false;
}

// get support information
RecordRTC.support = {
"video": !!navigator.getUserMedia,
"audio": !!AudioContext
};

RecordRTC.prototype = {
constructor: RecordRTC,
// get user media
Expand Down Expand Up @@ -713,6 +718,11 @@ function StereoAudioRecorder(mediaStream, root) {
},
// start video record
startVideo: function() {
if (!RecordRTC.support.video) {
console.log('record video is not supported');
return ;
}

console.log('start recording video frames');

// reset video blob
Expand Down Expand Up @@ -756,6 +766,11 @@ function StereoAudioRecorder(mediaStream, root) {
},
// start audio record
startAudio: function() {
if (!RecordRTC.support.audio) {
console.log('record audio is not supported');
return ;
}

console.log('start recording audio frames');

// reset audio blob
Expand Down
Loading

0 comments on commit bf26ed5

Please sign in to comment.