8000 fix: failed to execute endOfStream on MediaSource by xiaoyuhen · Pull Request #69 · zhihu/griffith · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: failed to execute endOfStream on MediaSource #69

New issue 8000

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

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/griffith-mp4/src/mse/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ export default class MSE {
destroy = () => {
this.mediaSource.removeEventListener('sourceopen', this.handleSourceOpen)
URL.revokeObjectURL(this.video.src)
if (this.mediaSource.readyState === 'open') {
if (
this.mediaSource.readyState === 'open' &&
!this.sourceBuffers.video.updating &&
!this.sourceBuffers.audio.updating
) {
this.mediaSource.endOfStream()
}
}
Expand Down
0