Do not use the "videoRemoved" event
As the video element is not needed it is not necessary to listen to the
"videoRemoved" event. Moreover, this event is not emitted if there is no
video element created by SimpleWebRTC, so moving away from it will be
needed to work with the raw screen stream.
When the "localScreenStopped" event is handled the Peer that sends the
screen is already ended and removed (before it was not due to
"localScreenStopped" being emitted too from the "videoRemoved" handler),
so it is not possible to find it by traversing the list of peers. In any
case it is not needed either, as there is a direct reference to it.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Loading
Please register or sign in to comment