Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用flv获取摄像头的直播流的时候,内部有时候不调用fetch方法,有时候调用了后会触发_internalAbort的内部中止请求 #796

Open
siifan168 opened this issue Aug 5, 2023 · 1 comment

Comments

@siifan168
Copy link

error: DOMException: The user aborted a request.
code: 20
message: "The user aborted a request."
name: "AbortError"

@siifan168
Copy link
Author

问题解决:
原因:我这边是有两个video标签,一个是源video标签,一个是展示video标签,源video标签用于创建flv,展示的video标签数据取源video标签的captureStream。
然后我是实时的视频,这个视频有时候在刚开始的10s没有数据,所有我起了一个定时器去重启,然后通过监听了onMediaData事件,当发生重启并且完成后,获取到数据的时候,会重新绑定了一下展示video标签,但是绑定的时候绑定错了,将源video标签通过captureStream创建的MediaSource绑定到它自己的srcObject上面去了,所以视频播放不了。
但是还有一个疑惑就是,关闭了这次播放再重新播放一次,后面的就不在拉流了,并且在flv的souceopen回调函数中一直不触发。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant