Skip to content

Commit c27bf00

Browse files
committed
fix bug
1 parent 0b5388e commit c27bf00

File tree

10 files changed

+21
-8
lines changed

10 files changed

+21
-8
lines changed

demo/document.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,7 @@ https://blog.csdn.net/nbwgl/article/details/122652003
927927

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

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

demo/public/dist.zip

-587 Bytes
Binary file not shown.

demo/public/pro.zip

114 Bytes
Binary file not shown.

demo/public/pro/demo-ai-check-frame.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@
7979
/><span>检测到黑屏、绿屏、花屏、马赛克丢弃渲染</span>
8080
</div>
8181
</div>
82+
<div class="input">
83+
<div>
84+
<input
85+
onclick="replay()"
86+
type="checkbox"
87+
id="isFlv"
88+
/><span>强制识别成flv <span style="color: red">(播放路径path不是以.flv结尾的,建议勾选上)</span> </span>
89+
</div>
90+
</div>
8291

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

117127
function create() {
118128
jessibuca = new JessibucaPro({
@@ -128,6 +138,7 @@
128138
useMSE: false,
129139
useWCS: false,
130140
useSIMD: true,
141+
isFlv: $isFlv.checked === true,
131142
showBandwidth: showOperateBtns, // 显示网速
132143
showPerformance: showOperateBtns, // 显示性能
133144
operateBtns: {

demo/public/qrcode.jpeg

-1.98 KB
Loading

dist/decoder.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jessibuca.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/demux/m7sLoader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default class M7sLoader extends CommonLoader {
1111
destroy() {
1212
super.destroy();
1313
this.player.debug.log('M7sDemux', 'destroy')
14-
this.player = null;
1514
}
1615

1716
dispatch(data) {

src/recorder/recordRTCLoader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default class RecordRTCLoader extends Emitter {
1313
this.isRecording = false;
1414
this.recordingTimestamp = 0;
1515
this.recordingInterval = null;
16+
this.recorder = null;
1617
player.debug.log('Recorder', 'init');
1718
}
1819

src/worker/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ export default class DecoderWorker {
1010
}
1111

1212
async destroy() {
13-
this.decoderWorker.postMessage({cmd: WORKER_SEND_TYPE.close})
14-
this.decoderWorker.terminate();
15-
this.decoderWorker = null;
13+
if (this.decoderWorker) {
14+
this.decoderWorker.postMessage({cmd: WORKER_SEND_TYPE.close})
15+
this.decoderWorker.terminate();
16+
this.decoderWorker = null;
17+
}
18+
1619
this.player.debug.log(`decoderWorker`, 'destroy');
1720
}
1821

0 commit comments

Comments
 (0)