0

我们已经在我们的平台上集成了 Agora 进行视频通话,但是一些用户收到了这个错误“ stream is closed and cannot be initialized”。在什么情况下会出现这个错误

4

1 回答 1

2

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.

于 2020-10-21T03:51:07.487 回答