Skip to content

Commit

Permalink
优化解码器降级
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Jan 4, 2024
1 parent 5b2fd93 commit 16cd2fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Binary file modified demo/public/dist.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/jessibuca.js

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion src/jessibuca.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,17 @@ class Jessibuca extends Emitter {

this.player.once(EVENTS_ERROR.mseSourceBufferError, () => {
this.pause().then(() => {
this.debug.log('Jessibuca', 'mseSourceBufferError close success')
if (this.player._opt.autoWasm) {
this.debug.log('Jessibuca', 'auto wasm [mse-> wasm] reset player and play')
this._resetPlayer({useMSE: false})
this.play(url, options).then(() => {
// resolve();
this.debug.log('Jessibuca', 'auto wasm [mse-> wasm] reset player and play success')
}).catch(() => {
// reject();
this.debug.warn('Jessibuca', 'auto wasm [mse-> wasm] reset player and play error')
});
}
})
})

Expand Down

1 comment on commit 16cd2fc

@vercel
Copy link

@vercel vercel bot commented on 16cd2fc Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.