Skip to content

Commit

Permalink
添加防御
Browse files Browse the repository at this point in the history
  • Loading branch information
bosscheng committed Feb 22, 2024
1 parent d1248f7 commit 8b6d740
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion demo/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,9 @@ pro 已经支持了 http://jessibuca.monibuca.com/player-pro.html

1.查看network 面板下面的 decoder.wasm 有没有被正确引入。返回个格式是不是 `application/wasm`格式的。

2.查看下decoder.js 返回的内容是否正确,是不是js内容。(会存在vue 或者react 项目 直接被返回了index.html 内容了)
2.查看下`decoder.js` 返回的内容是否正确,是不是js内容。(会存在vue 或者react 项目 直接被返回了index.html 内容了)

3.查看`decoder`参数是否配置的正确,见[decoder参数配置](http://jessibuca.monibuca.com/api.html#decoder)

> 需要正确的配置`decoder`参数,播放器默认引用的是根目录下面的`decoder.js`
Expand Down
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.

4 changes: 2 additions & 2 deletions src/utils/debug.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export default class Debug {
constructor(master) {
this.log = (name, ...args) => {
if (master._opt.debug) {
if (master._opt && master._opt.debug) {
console.log(`Jessibuca: [${name}]`, ...args);
}
};

this.warn = (name, ...args) => {
if (master._opt.debug) {
if (master._opt && master._opt.debug) {
console.warn(`Jessibuca: [${name}]`, ...args);
}
};
Expand Down

0 comments on commit 8b6d740

Please sign in to comment.