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

Commit c8c91ff

Browse files
authored
fix: failed to execute endOfStream on MediaSource (#69)
1 parent 7cd145b commit c8c91ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/griffith-mp4/src/mse/controller.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,11 @@ export default class MSE {
261261
destroy = () => {
262262
this.mediaSource.< 800B /span>removeEventListener('sourceopen', this.handleSourceOpen)
263263
URL.revokeObjectURL(this.video.src)
264-
if (this.mediaSource.readyState === 'open') {
264+
if (
265+
this.mediaSource.readyState === 'open' &&
266+
!this.sourceBuffers.video.updating &&
267+
!this.sourceBuffers.audio.updating
268+
) {
265269
this.mediaSource.endOfStream()
266270
}
267271
}

0 commit comments

Comments
 (0)
0