react-use-opentok
react-use-opentok copied to clipboard
How do we subscribe to all subscribers?
I am trying to create a group video call and normally in pure vanilla JS, I would do session.on('streamCreated', event) then just subscribe to the publisher. But using this hook, I tried to put
subscribe({
streams,
element: 'subscriber',
options: {
insertMode: 'append',
},
});
In my useEffect, but it says that subscribe is not a function.
Also when I try to console log "streams" from opentokProps, it is undefined. Can I get more clarification about this?
Thanks