Skip to content

Add "Play Audio" Operation#357

Closed
GCHQ77703 wants to merge 2 commits intogchq:masterfrom
GCHQ77703:audio
Closed

Add "Play Audio" Operation#357
GCHQ77703 wants to merge 2 commits intogchq:masterfrom
GCHQ77703:audio

Conversation

@GCHQ77703
Copy link
Copy Markdown
Member

Adds the ability to render a media data URI into a playable audio file. These look something like this. To get this into something that's playable we parse the data URI for it's type and convert the rest into binary data. We then create a blob from this data and from that blob we can create a blob URI which is a valid src on an audio element.

Creating this from the File type would seem simple following that logic, as it is just an extension to a Blob. Unfortunately, this is not the case because it appears Dish.mjs doesn't persist the type of a file (nor could I see a way of it doing so, especially due to the MIME type possibly changing through processing).

@n1474335
Copy link
Copy Markdown
Member

Rather than requiring a data URI as input, would it be possible to just accept a byteArray or ArrayBuffer in a similar way to the 'Render Image' operation? This would be more useful when manipulating and decrypting data. It's more likely that an audio file will be found than a data URI specifically.

@n1474335
Copy link
Copy Markdown
Member

This has been addressed in #446, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants