Reputation: 1567
We have inegrated Agora for video call in our platform , but some users are getting this error
"stream is closed and cannot be initialized
".
Under what circumstances this error may come
Upvotes: 0
Views: 374
Reputation: 582
I think you haven't added the stream properly and may also be trying to close it at the same time.
Check if you have added the stream-added
callback after initialising the client and joining the channel.
// Connect New People
client.on('stream-added', function (evt) {
var stream = evt.stream;
client.subscribe(stream, function (err) {
});
});
Also check the documentation to ensure all steps are followed for the video call.
If it still doesn't work, check out this file in my sample app implementing the same.
Upvotes: 2