mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
don't crash if user deny's microphone stream
This commit is contained in:
parent
3d8180244f
commit
e6caa81479
1 changed files with 3 additions and 2 deletions
|
@ -90,8 +90,9 @@ define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){
|
|||
*/
|
||||
Tone.Microphone.prototype.dispose = function() {
|
||||
Tone.Source.prototype.dispose.call(this);
|
||||
//this._stream.disconnect();
|
||||
this._mediaStream.disconnect();
|
||||
if (this._mediaStream) {
|
||||
this._mediaStream.disconnect();
|
||||
}
|
||||
this._stream = null;
|
||||
this._mediaStream = null;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue