opentok / opentok-react

React components for OpenTok.js
https://www.npmjs.com/package/opentok-react
MIT License
107 stars 105 forks source link

Subscriber Stream appending on joining video call after hanging up. #197

Closed meljason closed 3 years ago

meljason commented 3 years ago

I am having an issue where when I join a video call. Then I hangup up, then join again to the same session, the subscriber stream would append. So I would join and would see 2 of the same subscriber then if I leave and join again, I would see 3 and so on.

The way I handled hanging up is like so:

function hangup() {
      publisher.destroy();
      session && session.disconnect(publisher);
}

Can anybody help me on this?

meljason commented 3 years ago

I realized that my options on session.subscriber was set to "append" instead of "replace". I will close this issue.