mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-01 08:59:51 -04:00
Update event name to MIC_LISTENING
This commit is contained in:
parent
396d69743d
commit
f5edcfa3bb
2 changed files with 11 additions and 8 deletions
src/engine
|
@ -458,12 +458,11 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Event name for requesting an update of the indicator that shows that the
|
||||
* microphone is being used to stream audio.
|
||||
* Event name to indicate that the microphone is being used to stream audio.
|
||||
* @const {string}
|
||||
*/
|
||||
static get UPDATE_MIC_INDICATOR () {
|
||||
return 'UPDATE_MIC_INDICATOR';
|
||||
static get MIC_LISTENING () {
|
||||
return 'MIC_LISTENING';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -998,8 +997,12 @@ class Runtime extends EventEmitter {
|
|||
return isConnected;
|
||||
}
|
||||
|
||||
requestMicIndicatorUpdate (visible) {
|
||||
this.emit(Runtime.UPDATE_MIC_INDICATOR, visible);
|
||||
/**
|
||||
* Emit an event to indicate that the microphone is being used to stream audio.
|
||||
* @param {boolean} listening - true if the microphone is currently listening.
|
||||
*/
|
||||
emitMicListening (listening) {
|
||||
this.emit(Runtime.MIC_LISTENING, listening);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue