Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Dec 25, 2024
1 parent 0b5388e commit c27bf00
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 8 deletions.
3 changes: 1 addition & 2 deletions demo/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,7 @@ https://blog.csdn.net/nbwgl/article/details/122652003

使用`http`协议启动,可以配合`nginx`或者`node` 启动。

> pro 支持通过配置参数,只使用mse解码,不启动worker。 见 demo-file.html
> ~~pro 支持通过配置参数,只使用mse解码,不启动worker。 见 demo-file.html~~ 暂不推荐,这种只能走硬解码,没法走软解码。推荐走加载CDN资源的方案。
#### 方案二:加载CDN资源

Expand Down
Binary file modified demo/public/dist.zip
Binary file not shown.
Binary file modified demo/public/pro.zip
Binary file not shown.
11 changes: 11 additions & 0 deletions demo/public/pro/demo-ai-check-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
/><span>检测到黑屏、绿屏、花屏、马赛克丢弃渲染</span>
</div>
</div>
<div class="input">
<div>
<input
onclick="replay()"
type="checkbox"
id="isFlv"
/><span>强制识别成flv <span style="color: red">(播放路径path不是以.flv结尾的,建议勾选上)</span> </span>
</div>
</div>

<div class="input">
<div>输入URL:</div>
Expand Down Expand Up @@ -113,6 +122,7 @@
var showOperateBtns = true; // 是否显示按钮
var forceNoOffscreen = true; //
var jessibuca = null;
var $isFlv = document.getElementById('isFlv');

function create() {
jessibuca = new JessibucaPro({
Expand All @@ -128,6 +138,7 @@
useMSE: false,
useWCS: false,
useSIMD: true,
isFlv: $isFlv.checked === true,
showBandwidth: showOperateBtns, // 显示网速
showPerformance: showOperateBtns, // 显示性能
operateBtns: {
Expand Down
Binary file modified demo/public/qrcode.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/decoder.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jessibuca.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/demux/m7sLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default class M7sLoader extends CommonLoader {
destroy() {
super.destroy();
this.player.debug.log('M7sDemux', 'destroy')
this.player = null;
}

dispatch(data) {
Expand Down
1 change: 1 addition & 0 deletions src/recorder/recordRTCLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class RecordRTCLoader extends Emitter {
this.isRecording = false;
this.recordingTimestamp = 0;
this.recordingInterval = null;
this.recorder = null;
player.debug.log('Recorder', 'init');
}

Expand Down
9 changes: 6 additions & 3 deletions src/worker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ export default class DecoderWorker {
}

async destroy() {
this.decoderWorker.postMessage({cmd: WORKER_SEND_TYPE.close})
this.decoderWorker.terminate();
this.decoderWorker = null;
if (this.decoderWorker) {
this.decoderWorker.postMessage({cmd: WORKER_SEND_TYPE.close})
this.decoderWorker.terminate();
this.decoderWorker = null;
}

this.player.debug.log(`decoderWorker`, 'destroy');
}

Expand Down

0 comments on commit c27bf00

Please sign in to comment.