react-use-opentok icon indicating copy to clipboard operation
react-use-opentok copied to clipboard

How do we subscribe to all subscribers?

Open meljason opened this issue 3 years ago • 0 comments

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

meljason avatar Mar 31 '21 21:03 meljason