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

No currentdevicesdetected emmitted from ZiggeoApi.V2.AudioRecorder #80

Open
mikevoets opened this issue Jun 19, 2024 · 0 comments
Open

Comments

@mikevoets
Copy link

I'm trying to get the audio devices in a similar fashion as described here: https://ziggeo.com/docs/how-tos/javascript/custom-camera-microphone-fields/

But unfortunately, the AudioRecorder does not emit the currentdevicesdetected event.

To work around this, I do the following:

recorder.on(
  'bound',
  () => {
    if (typeof recorder.recorder !== 'undefined') {
      const _recorder = recorder.recorder;
      _recorder.enumerateDevices().success((devices: any) => {
        const selectedMicrophone = _recorder.currentDevices().audio;
        const microphones = (Object.values(devices.audio).map((mic: any) => [mic.id, mic.label]));
        ...
      }, recorder);
    }
  },
  recorder
);

But I'm not sure if this is a good workaround.

Would it be possible to have it emit currentdevicesdetected instead like in the regular Recorder?

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

1 participant