Browse Source

Never try to add a stream without audiotrack to audio processor.

pull/206/head
Simon Eisenmann 10 years ago committed by Simon Eisenmann
parent
commit
84391f5a8f
  1. 5
      static/js/mediastream/usermedia.js

5
static/js/mediastream/usermedia.js

@ -167,6 +167,11 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _ @@ -167,6 +167,11 @@ define(['jquery', 'underscore', 'audiocontext', 'webrtc.adapter'], function($, _
if (this.audioSource) {
this.audioSource.disconnect();
}
var audioTracks = stream.getAudioTracks();
if (audioTracks.length < 1) {
this.audioSource = null;
return;
}
// Connect to audioProcessor.
this.audioSource = context.createMediaStreamSource(stream);
//console.log("got source", this.audioSource);

Loading…
Cancel
Save