message playback anim

This commit is contained in:
Andrew Gundersen 2021-03-11 15:46:34 -06:00
commit 88d7029a5c
4 changed files with 80 additions and 32 deletions

View file

@ -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', {