Open MobeenAshraf opened 4 years ago
This AbortError is caused by calling Track.stop()
immediately after calling Track.play()
, not caused by the autoplay policy. In Agora Web SDK NG, videoTrack.play()
will not use Promise
to call HTMLVideoElement.play
, because there is no autoplay problem in videoTrack.play
, SDK's <video>
tag does not have any audio source and this <video>
tag's muted
attribute is true
.
If you want to catch the autoplay error in SDK, you should use this callback onAudioAutoplayFailed.
I am not calling stop for remote players. I am calling stop for local track when I am muting/stopping video only
Ok, You can ignore this warning now. We will hide this warning in the future.
This may be unrelated (and I am not yet able to confirm for now) but whenever this error appears the video container also doesn't appear. I may be able to confirm this if required
are you using react? could this also be from multiple re-renders triggering play on the same video if there are back to re-renders?
I am using react but it shouldn't be from multiple re-renders.
play is called on user-published and I also un-subscribe on componentWillUnMount
.
I will try to post some more details/logs
Getting following error:
It leads to getting audio but doesn't create a video player. The error itself is quite intermittent but has occurred quite a few times now.
From the link: https://goo.gl/LdLk22, mentioned with error, I can see that play method can be a promise and we can do something like: