AgoraIO / Basic-Video-Broadcasting

Sample app to join/leave a channel, set the role as a host/audience, mute/unmute, switch between front/rear cameras, and set the video parameters.
MIT License
269 stars 287 forks source link

Screen Sharing error in OpenLive-Web #74

Open hjhimanshu01 opened 4 years ago

hjhimanshu01 commented 4 years ago

Hello, I have been trying to set up the screensharing functionality correctly since last few days and I'm getting a particular issue that seems to root from the project. Here's the screenshot.

Steps to reproduce:

i ) Go to agora web platform and join a channel ( let's say "hello" ) as a "host"

ii ) Next join the same channel as a "attendee"

iii ) try using the screen share feature

iv ) then click on stop sharing button, "attendee" side will have this error

Apart from that I have noticed some more errors related to this line

Possible issue is that currentStream isn't defined when the stream needs to be removed. Screenshot (187) Screenshot (188)

hjhimanshu01 commented 4 years ago

Hey this happens because stream is removed twice, once the removeStream is called and next removeStreamById , I found a temp fix by removing the function of removeStreamById.