mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 23:49:21 -04:00
Add mic indicator update event for speech2text
This commit is contained in:
parent
64a1d3e02b
commit
e44eff48e3
2 changed files with 16 additions and 0 deletions
src/engine
|
@ -457,6 +457,15 @@ class Runtime extends EventEmitter {
|
|||
return 'PERIPHERAL_SCAN_TIMEOUT';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name for requesting an update of the indicator that shows that the
|
||||
* microphone is being used to stream audio.
|
||||
* @const {string}
|
||||
*/
|
||||
static get UPDATE_MIC_INDICATOR () {
|
||||
return 'UPDATE_MIC_INDICATOR';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event name for reporting that blocksInfo was updated.
|
||||
* @const {string}
|
||||
|
@ -989,6 +998,10 @@ class Runtime extends EventEmitter {
|
|||
return isConnected;
|
||||
}
|
||||
|
||||
requestMicIndicatorUpdate (visible) {
|
||||
this.emit(Runtime.UPDATE_MIC_INDICATOR, visible);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the function associated with the given opcode.
|
||||
* @param {!string} opcode The opcode to look up.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue