failed console Failed to add stream to proxy

hyuk

Member
Hi,

We created a function to “publish” the video as soon as the video broadcaster “stops” the video while transmitting it.

If the video receiver stops the first stream(stream.stop(remoteVideo))and then plays the second stream (participant.getStreams()[0].play(remoteVideo, options)), the following error occurs.
"Failed to add stream to proxy"

If the video receiver delays the playback of the next video by about 2 seconds, the video will play without an error, but if it is set to less than that, an error will occur.

You can put a delay, but it seems that playback may not work depending on the network situation or certain situations, so please give your opinion on whether there is a correct way.
 

Max

Administrator
Staff member
Good day.
Seems like you're trying to play a stream which is not published yet. You should check if the stream is published on server using REST API call /stream/find before playing it again. However, you may not know a certain stream name in RoomApi case, so you should use /stream/find_all and filter streams by a participant name.
If this seems too complex, the timeout on playback is an acceptable solution too.
 
Top