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

About callback between JavaScript and this plug-in #3

Open
jty016 opened this issue Oct 7, 2019 · 1 comment
Open

About callback between JavaScript and this plug-in #3

jty016 opened this issue Oct 7, 2019 · 1 comment

Comments

@jty016
Copy link

jty016 commented Oct 7, 2019

Thank you for your repo.

I'd like to send real-time audio from the host machine to the other server with IE11 browser.
With this plug-in I can record and send the recorded audio when the recording is finished.
For real-time audio, however, I think I have to define somewhat different ActiveX Control class.

Could you let me know how can I approach for this task?

Thank you in advance

@amouniverso
Copy link
Owner

Basically, you have two options for the task:

  1. ActiveX Controls have a built-in event functionality accessible from cliend-side javascript. To give you an idea:
<script for="MyControl" event="ReceiveMessage(msg)">
    alert(msg);
</script>

Also you should implement and call the ReceiveMessage() method with audio chunks from PortAudio API on the C++ backend side.

  1. Use of a ringbuffer https://en.wikipedia.org/wiki/Circular_buffer for a temporary chunks storage, then polling that storage from a javascript.

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