1
votes

I cannot seem to wrap my head around how to create a link to toggle a tokbox publishAudio method. I am able to subscribe and publish a video as well as create an object with the publishAudio as a property. Any help would be appreciated!

1

1 Answers

2
votes

You can call publisher.publishAudio(true), or publisher.publishAudio(false), to choose to send audio or not. This dynamically updates your publisher even after you've already started publishing to the stream.

You can see the docs for that here: https://tokbox.com/opentok/libraries/client/js/reference/Publisher.html#publishAudio