message playback anim
This commit is contained in:
parent
ceb7743c8b
commit
88d7029a5c
4 changed files with 80 additions and 32 deletions
|
|
@ -55,14 +55,18 @@ const onMessage = (message: string): void => {
|
|||
|
||||
// check to see if this is a Render Message.
|
||||
if (m.content) {
|
||||
|
||||
// If there is audio, play it.
|
||||
if (m.content.audio) {
|
||||
const audioBytes = Buffer.from(m.content.audio as string, 'hex');
|
||||
m.content.audio = true;
|
||||
play(audioBytes);
|
||||
} else {
|
||||
m.content.audio = false;
|
||||
}
|
||||
|
||||
// if there is no unique id, add it.
|
||||
if(!m.uid) m.uid = uuidv4();
|
||||
if(!m.uid) m.uid = uuidv4();
|
||||
}
|
||||
|
||||
backgroundMitt.emit('ipc-renderer', {
|
||||
|
|
|
|||
Loading…
Reference in a new issue