How can use a blob/stream as analyzer input? #83
Unanswered
jgabriel98
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Or maybe is there a way to analyse a stream directly instead of a AudioNode? |
Beta Was this translation helpful? Give feedback.
1 reply
-
The only way I know how to do this is by using an HTMLAudioElement: const audio = new Audio();
audio.src = URL.createObjectURL( blob );
audio.play();
If you mean the user gesture required to unlock the AudioContext, any click in the page will do (after audioMotion is instantiated). You can also whitelist your server in the browser's site settings to always allow sound playback. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, the thing is: i request my server for a track and it answers with a .mp3 file.
But i cannot plug the
blob.stream()
into audioMotion-analyzer:more specifically, i cannot use a
ReadableStream
as aMediaStream
:So my question is:
How can i turn a blob/stream into a MediaStream or AudioSouceNode, so i can plug it into audioMotion-analyzer?
note: using
<audio />
is not an option, since it requires user input to start playing. And i want to automatically analyze the audio without any user interaction.note 2: i only want to visually analyze it, no sound output is required.
Beta Was this translation helpful? Give feedback.
All reactions