mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Added null check in case the user denied access to the microphone.
This commit is contained in:
parent
31323c2eca
commit
82185a53e9
1 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,9 @@ public class SoundEditor extends Sprite {
|
|||
}
|
||||
|
||||
private function addMicVolumeSlider():void {
|
||||
function setMicLevel(level:Number):void { microphone.gain = level }
|
||||
function setMicLevel(level:Number):void {
|
||||
if(microphone) microphone.gain = level;
|
||||
}
|
||||
|
||||
addChild(micVolumeLabel = Resources.makeLabel('Microphone volume:', CSS.normalTextFormat, 22, 240));
|
||||
|
||||
|
|
Loading…
Reference in a new issue