Problem with startSpeaking / stopSpeaking handling

Hi,

I’ve implemented startSpeaking/stopSpeaking handlign in my reactApp.
When I run the Visio session the first time, everything works fine and I can see who is talking.
The problem occurs when a user leaves a session and then come back. The session.on(“publisherStartSpeaking”) fails with “There was an error connecting to the session: Cannot read property ‘on’ of undefined” message.

I’ve ran a lot of tests on my code but I think there’s maybe a problem in your code. Or I don’t handle startspeaking correctly ?

To reproduce the problem. Just add the following code after this.subscribeToStreamDestroyed(); in VideoRoomComponent.js line 157 of your React App.

this.state.session.on('publisherStartSpeaking', (event) => {
            console.log('Publisher ' + event.connection.connectionId + ' start speaking');
        });

I run two sessions in my Chrome browser (one in private mode) it runs OK. I can see the log working.

then I leave one session with the button in the interface and then I refresh the session. Then the problem occurs (index.js:1 There was an error connecting to the session: Cannot read property ‘on’ of undefined)

I anyone can help me to understand what I’m doing wrong.

Thanks,
Mikaël Morvan