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

Support for updating stream and teardown of previous resources #17

Open
kashifshamaz21 opened this issue May 6, 2015 · 1 comment
Open

Comments

@kashifshamaz21
Copy link

Currently there is no way to start() hark monitoring. When the exposed function hark(stream, options) is triggered, it automatically starts the poll.
A better way would be to:

  1. support an api to start the poll: hark.start()
  2. on hark.stop(), clear the setTimeout, disconnect the analyser and free associated resources
  3. Also, a way to update the media stream at runtime: hark.setStream() - this would first do hark.stop() to teardown the current existing pipeline, and then re-create it using the new stream.
@ibc
Copy link
Contributor

ibc commented Nov 24, 2017

Not sure why do you need so much sugar API. It's easier if you just call stop() on your Hark instance and create a new one with the new stream.

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

No branches or pull requests

2 participants