Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create howl from MediaStream #1314

Open
biellls opened this issue Mar 31, 2020 · 4 comments · May be fixed by #1634
Open

Create howl from MediaStream #1314

biellls opened this issue Mar 31, 2020 · 4 comments · May be fixed by #1634

Comments

@biellls
Copy link

biellls commented Mar 31, 2020

Is there a way to create a howl from a MediaStream? I'm trying with html5: true but getting 404 (File not found).

navigator.mediaDevices.getUserMedia({
  audio: true
}).then(function (stream) {
  sound = new Howl({
    src: stream,
    html5: true,
    volume: 1.0,
  });
  console.log('New howl created')
  sound.play()
})
@biellls
Copy link
Author

biellls commented Apr 1, 2020

Any updates on this? If it's not possible I would be interested in starting an issue hunt on this. Not sure how to go about it but I'd be grateful if someone can reply or email me and talk about details.

@sorcerykid
Copy link

I was checking out Howl in search of an API for streaming audio in a Web page, but also with the ability to manipulate the sound during playback. Am I to understand that Howl doesn't support continuous audio streams?

@gruckionvit
Copy link

I also really want this, I have search the repository for MediaStream and there are no references.

@sorcerykid
Copy link

I successfully managed to work around the issue by creating my own AudioContext and applying effects manually, therefore obviating the need for Howler or any third-party JS library completely. The Web Audio API provides this functionality.

Here's some boilerplate code I developed that has been tested with a live SHOUTcast server. It chains several different audio nodes including Convolver, StereoPanner, BiQuadFilter, and Gain, and it provides dry/wet effects loop mixing for the Convolver.

https://gist.github.com/sorcerykid/a6cb75122b9522607821857c65313501

Note that the convolver requires an impulse response waveform which can be readily obtained from various sources online.

@rafern rafern linked a pull request Dec 8, 2022 that will close this issue
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 a pull request may close this issue.

3 participants