64850858
4 years ago
25 changed files with 6693 additions and 461 deletions
@ -0,0 +1,296 @@ |
|||
<template> |
|||
<div id="jessibuca" style="width: auto; height: auto"> |
|||
<div id="container" ref="container" style="width: 100%; height: 10rem; background-color: #000" @dblclick="fullscreenSwich"> |
|||
<div class="buttons-box" id="buttonsBox"> |
|||
<div class="buttons-box-left"> |
|||
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> |
|||
<i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i> |
|||
<i class="iconfont icon-stop jessibuca-btn" @click="destroy"></i> |
|||
<i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="jessibuca.mute()"></i> |
|||
<i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="jessibuca.cancelMute()"></i> |
|||
</div> |
|||
<div class="buttons-box-right"> |
|||
<span class="jessibuca-btn">{{kBps}} kb/s</span> |
|||
<!-- <i class="iconfont icon-file-record1 jessibuca-btn"></i>--> |
|||
<!-- <i class="iconfont icon-xiangqing2 jessibuca-btn" ></i>--> |
|||
<i class="iconfont icon-crop2 jessibuca-btn" @click="jessibuca.screenshot('截图','png',0.5)"></i> |
|||
<i class="iconfont icon-shuaxin11 jessibuca-btn" @click="playBtnClick"></i> |
|||
<i v-if="!fullscreen" class="iconfont icon-weibiaoti10 jessibuca-btn" @click="fullscreenSwich"></i> |
|||
<i v-if="fullscreen" class="iconfont icon-weibiaoti11 jessibuca-btn" @click="fullscreenSwich"></i> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'jessibuca', |
|||
data() { |
|||
return { |
|||
jessibuca: null, |
|||
playing: false, |
|||
isNotMute: false, |
|||
quieting: false, |
|||
fullscreen: false, |
|||
loaded: false, // mute |
|||
speed: 0, |
|||
performance: "", // 工作情况 |
|||
kBps: 0, |
|||
btnDom: null, |
|||
videoInfo: null, |
|||
volume: 1, |
|||
rotate: 0, |
|||
vod: true, // 点播 |
|||
forceNoOffscreen: false, |
|||
}; |
|||
}, |
|||
props: ['videoUrl', 'error', 'hasaudio', 'height'], |
|||
mounted () { |
|||
window.onerror = (msg) => { |
|||
// console.error(msg) |
|||
}; |
|||
let paramUrl = decodeURIComponent(this.$route.params.url) |
|||
this.$nextTick(() =>{ |
|||
let dom = document.getElementById("container"); |
|||
dom.style.height = (9/16 ) * dom.clientWidth + "px" |
|||
if (typeof (this.videoUrl) == "undefined") { |
|||
this.videoUrl = paramUrl; |
|||
} |
|||
this.btnDom = document.getElementById("buttonsBox"); |
|||
console.log("初始化时的地址为: " + this.videoUrl) |
|||
this.play(this.videoUrl) |
|||
}) |
|||
}, |
|||
watch:{ |
|||
videoUrl(newData, oldData){ |
|||
this.play(newData) |
|||
}, |
|||
immediate:true |
|||
}, |
|||
methods: { |
|||
create(){ |
|||
let options = {}; |
|||
console.log(this.$refs.container) |
|||
|
|||
this.jessibuca = new window.Jessibuca(Object.assign( |
|||
{ |
|||
container: this.$refs.container, |
|||
videoBuffer: 0.5, // 最大缓冲时长,单位秒 |
|||
isResize: true, |
|||
decoder: "./static/js/jessibuca/index.js", |
|||
// text: "WVP-PRO", |
|||
// background: "bg.jpg", |
|||
loadingText: "加载中", |
|||
hasAudio: this.hasAudio, |
|||
debug: false, |
|||
supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 |
|||
operateBtns: { |
|||
fullscreen: false, |
|||
screenshot: false, |
|||
play: false, |
|||
audio: false, |
|||
}, |
|||
record: "record", |
|||
vod: this.vod, |
|||
forceNoOffscreen: this.forceNoOffscreen, |
|||
isNotMute: this.isNotMute, |
|||
}, |
|||
options |
|||
)); |
|||
|
|||
let _this = this; |
|||
this.jessibuca.on("load", function () { |
|||
console.log("on load init"); |
|||
}); |
|||
|
|||
this.jessibuca.on("log", function (msg) { |
|||
console.log("on log", msg); |
|||
}); |
|||
this.jessibuca.on("record", function (msg) { |
|||
console.log("on record:", msg); |
|||
}); |
|||
this.jessibuca.on("pause", function () { |
|||
_this.playing = false; |
|||
}); |
|||
this.jessibuca.on("play", function () { |
|||
_this.playing = true; |
|||
}); |
|||
this.jessibuca.on("fullscreen", function (msg) { |
|||
console.log("on fullscreen", msg); |
|||
_this.fullscreen = msg |
|||
}); |
|||
|
|||
this.jessibuca.on("mute", function (msg) { |
|||
console.log("on mute", msg); |
|||
_this.isNotMute = !msg; |
|||
}); |
|||
this.jessibuca.on("audioInfo", function (msg) { |
|||
// console.log("audioInfo", msg); |
|||
}); |
|||
|
|||
this.jessibuca.on("videoInfo", function (msg) { |
|||
this.videoInfo = msg; |
|||
// console.log("videoInfo", msg); |
|||
|
|||
}); |
|||
|
|||
this.jessibuca.on("bps", function (bps) { |
|||
// console.log('bps', bps); |
|||
|
|||
}); |
|||
let _ts = 0; |
|||
this.jessibuca.on("timeUpdate", function (ts) { |
|||
// console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts); |
|||
_ts = ts; |
|||
}); |
|||
|
|||
this.jessibuca.on("videoInfo", function (info) { |
|||
console.log("videoInfo", info); |
|||
}); |
|||
|
|||
this.jessibuca.on("error", function (error) { |
|||
console.log("error", error); |
|||
}); |
|||
|
|||
this.jessibuca.on("timeout", function () { |
|||
console.log("timeout"); |
|||
}); |
|||
|
|||
this.jessibuca.on('start', function () { |
|||
console.log('start'); |
|||
}) |
|||
|
|||
this.jessibuca.on("performance", function (performance) { |
|||
let show = "卡顿"; |
|||
if (performance === 2) { |
|||
show = "非常流畅"; |
|||
} else if (performance === 1) { |
|||
show = "流畅"; |
|||
} |
|||
_this.performance = show; |
|||
}); |
|||
this.jessibuca.on('buffer', function (buffer) { |
|||
// console.log('buffer', buffer); |
|||
}) |
|||
|
|||
this.jessibuca.on('stats', function (stats) { |
|||
// console.log('stats', stats); |
|||
}) |
|||
|
|||
this.jessibuca.on('kBps', function (kBps) { |
|||
_this.kBps = Math.round(kBps); |
|||
}); |
|||
|
|||
// 显示时间戳 PTS |
|||
this.jessibuca.on('videoFrame', function () { |
|||
|
|||
}) |
|||
|
|||
// |
|||
this.jessibuca.on('metadata', function () { |
|||
|
|||
}); |
|||
}, |
|||
playBtnClick: function (event){ |
|||
this.play(this.videoUrl) |
|||
}, |
|||
play: function (url) { |
|||
console.log(url) |
|||
if (this.jessibuca) { |
|||
this.destroy(); |
|||
} |
|||
this.create(); |
|||
this.jessibuca.on("play", () => { |
|||
this.playing = true; |
|||
this.loaded = true; |
|||
this.quieting = this.jessibuca.quieting; |
|||
}); |
|||
if (this.jessibuca.hasLoaded()) { |
|||
this.jessibuca.play(url); |
|||
} else { |
|||
this.jessibuca.on("load", () => { |
|||
console.log("load 播放") |
|||
this.jessibuca.play(url); |
|||
}); |
|||
} |
|||
}, |
|||
pause: function () { |
|||
if (this.jessibuca) { |
|||
this.jessibuca.pause(); |
|||
} |
|||
this.playing = false; |
|||
this.err = ""; |
|||
this.performance = ""; |
|||
}, |
|||
destroy: function () { |
|||
if (this.jessibuca) { |
|||
this.jessibuca.destroy(); |
|||
} |
|||
if (document.getElementById("buttonsBox") == null) { |
|||
document.getElementById("container").appendChild(this.btnDom) |
|||
} |
|||
this.jessibuca = null; |
|||
this.playing = false; |
|||
this.err = ""; |
|||
this.performance = ""; |
|||
|
|||
}, |
|||
eventcallbacK: function(type, message) { |
|||
// console.log("player 事件回调") |
|||
// console.log(type) |
|||
// console.log(message) |
|||
}, |
|||
fullscreenSwich: function (){ |
|||
let isFull = this.isFullscreen() |
|||
this.jessibuca.setFullscreen(!isFull) |
|||
this.fullscreen = !isFull; |
|||
}, |
|||
isFullscreen: function (){ |
|||
return document.fullscreenElement || |
|||
document.msFullscreenElement || |
|||
document.mozFullScreenElement || |
|||
document.webkitFullscreenElement || false; |
|||
} |
|||
}, |
|||
destroyed() { |
|||
if (this.jessibuca) { |
|||
this.jessibuca.destroy(); |
|||
} |
|||
this.playing = false; |
|||
this.loaded = false; |
|||
this.performance = ""; |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
.buttons-box{ |
|||
width: 100%; |
|||
height: 28px; |
|||
background-color: rgba(43, 51, 63, 0.7); |
|||
position: absolute; |
|||
display: -webkit-box; |
|||
display: -ms-flexbox; |
|||
display: flex; |
|||
left: 0; |
|||
bottom: 0; |
|||
user-select: none; |
|||
z-index: 10; |
|||
} |
|||
.jessibuca-btn{ |
|||
width: 20px; |
|||
color: rgb(255, 255, 255); |
|||
line-height: 27px; |
|||
margin: 0px 10px; |
|||
padding: 0px 2px; |
|||
cursor: pointer; |
|||
text-align: center; |
|||
font-size: 0.8rem !important; |
|||
} |
|||
.buttons-box-right { |
|||
position: absolute; |
|||
right: 0; |
|||
} |
|||
</style> |
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Binary file not shown.
@ -1,396 +0,0 @@ |
|||
|
|||
|
|||
|
|||
|
|||
/*////////////////////////////////////////////////////////////////// |
|||
[ FONT ]*/ |
|||
|
|||
@font-face { |
|||
font-family: Poppins-Regular; |
|||
src: url('../fonts/poppins/Poppins-Regular.ttf'); |
|||
} |
|||
|
|||
@font-face { |
|||
font-family: Poppins-Medium; |
|||
src: url('../fonts/poppins/Poppins-Medium.ttf'); |
|||
} |
|||
|
|||
@font-face { |
|||
font-family: Poppins-Bold; |
|||
src: url('../fonts/poppins/Poppins-Bold.ttf'); |
|||
} |
|||
|
|||
@font-face { |
|||
font-family: Poppins-SemiBold; |
|||
src: url('../fonts/poppins/Poppins-SemiBold.ttf'); |
|||
} |
|||
|
|||
.limiter { |
|||
width: 100%; |
|||
margin: 0 auto; |
|||
font-family: Poppins-Regular, sans-serif; |
|||
|
|||
} |
|||
|
|||
.container-login100 { |
|||
width: 100%; |
|||
min-height: 100vh; |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
display: -moz-box; |
|||
display: -ms-flexbox; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: center; |
|||
align-items: center; |
|||
background: #f2f2f2; |
|||
} |
|||
|
|||
.wrap-login100 { |
|||
background: #fff; |
|||
border-radius: 10px; |
|||
overflow: hidden; |
|||
padding: 77px 55px 33px 55px; |
|||
|
|||
box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.1); |
|||
-moz-box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.1); |
|||
-webkit-box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.1); |
|||
-o-box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.1); |
|||
-ms-box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.1); |
|||
} |
|||
|
|||
|
|||
/*------------------------------------------------------------------ |
|||
[ Form ]*/ |
|||
|
|||
.login100-form { |
|||
width: 100%; |
|||
} |
|||
|
|||
.login100-form-title { |
|||
display: block; |
|||
font-family: Poppins-Bold; |
|||
font-size: 30px; |
|||
color: #333333; |
|||
line-height: 1.2; |
|||
text-align: center; |
|||
|
|||
} |
|||
.login100-form-title i { |
|||
font-size: 60px; |
|||
} |
|||
|
|||
/*------------------------------------------------------------------ |
|||
[ Input ]*/ |
|||
|
|||
.wrap-input100 { |
|||
width: 100%; |
|||
position: relative; |
|||
border-bottom: 2px solid #adadad; |
|||
margin-bottom: 37px; |
|||
} |
|||
|
|||
.input100 { |
|||
font-family: Poppins-Regular; |
|||
font-size: 15px; |
|||
color: #555555; |
|||
line-height: 1.2; |
|||
|
|||
display: block; |
|||
width: 100%; |
|||
height: 45px; |
|||
background: transparent; |
|||
padding: 0 5px; |
|||
outline: none; |
|||
border: none; |
|||
} |
|||
.input100::-webkit-input-placeholder { color: #adadad;} |
|||
.input100:-moz-placeholder { color: #adadad;} |
|||
.input100::-moz-placeholder { color: #adadad;} |
|||
.input100:-ms-input-placeholder { color: #adadad;} |
|||
|
|||
/*---------------------------------------------*/ |
|||
.focus-input100 { |
|||
position: absolute; |
|||
display: block; |
|||
width: 100%; |
|||
height: 100%; |
|||
top: 0; |
|||
left: 0; |
|||
pointer-events: none; |
|||
color:transparent; |
|||
} |
|||
|
|||
.focus-input100::before { |
|||
content: ""; |
|||
display: block; |
|||
position: absolute; |
|||
bottom: -2px; |
|||
left: 0; |
|||
width: 0; |
|||
height: 2px; |
|||
|
|||
-webkit-transition: all 0.4s; |
|||
-o-transition: all 0.4s; |
|||
-moz-transition: all 0.4s; |
|||
transition: all 0.4s; |
|||
|
|||
background: #6a7dfe; |
|||
background: -webkit-linear-gradient(left, #21d4fd, #b721ff); |
|||
background: -o-linear-gradient(left, #21d4fd, #b721ff); |
|||
background: -moz-linear-gradient(left, #21d4fd, #b721ff); |
|||
background: linear-gradient(left, #21d4fd, #b721ff); |
|||
} |
|||
|
|||
.focus-input100::after { |
|||
font-family: Poppins-Regular; |
|||
font-size: 15px; |
|||
color: #999999; |
|||
line-height: 1.2; |
|||
|
|||
content: attr(data-placeholder); |
|||
display: block; |
|||
width: 100%; |
|||
position: absolute; |
|||
top: 16px; |
|||
left: 0px; |
|||
padding-left: 5px; |
|||
|
|||
-webkit-transition: all 0.4s; |
|||
-o-transition: all 0.4s; |
|||
-moz-transition: all 0.4s; |
|||
transition: all 0.4s; |
|||
} |
|||
|
|||
.input100:focus + .focus-input100::after { |
|||
top: -15px; |
|||
} |
|||
|
|||
.input100:focus + .focus-input100::before { |
|||
width: 100%; |
|||
} |
|||
|
|||
.has-val.input100 + .focus-input100::after { |
|||
top: -15px; |
|||
} |
|||
|
|||
.has-val.input100 + .focus-input100::before { |
|||
width: 100%; |
|||
} |
|||
|
|||
/*---------------------------------------------*/ |
|||
.btn-show-pass { |
|||
font-size: 15px; |
|||
color: #999999; |
|||
|
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
display: -moz-box; |
|||
display: -ms-flexbox; |
|||
display: flex; |
|||
align-items: center; |
|||
position: absolute; |
|||
height: 100%; |
|||
top: 0; |
|||
right: 0; |
|||
padding-right: 5px; |
|||
cursor: pointer; |
|||
-webkit-transition: all 0.4s; |
|||
-o-transition: all 0.4s; |
|||
-moz-transition: all 0.4s; |
|||
transition: all 0.4s; |
|||
} |
|||
|
|||
.btn-show-pass:hover { |
|||
color: #6a7dfe; |
|||
color: -webkit-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: -o-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: -moz-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: linear-gradient(left, #21d4fd, #b721ff); |
|||
} |
|||
|
|||
.btn-show-pass.active { |
|||
color: #6a7dfe; |
|||
color: -webkit-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: -o-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: -moz-linear-gradient(left, #21d4fd, #b721ff); |
|||
color: linear-gradient(left, #21d4fd, #b721ff); |
|||
} |
|||
|
|||
|
|||
|
|||
/*------------------------------------------------------------------ |
|||
[ Button ]*/ |
|||
.container-login100-form-btn { |
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
display: -moz-box; |
|||
display: -ms-flexbox; |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
justify-content: center; |
|||
padding-top: 13px; |
|||
} |
|||
|
|||
.wrap-login100-form-btn { |
|||
width: 100%; |
|||
display: block; |
|||
position: relative; |
|||
z-index: 1; |
|||
border-radius: 25px; |
|||
overflow: hidden; |
|||
margin: 0 auto; |
|||
} |
|||
|
|||
.login100-form-bgbtn { |
|||
position: absolute; |
|||
z-index: -1; |
|||
width: 300%; |
|||
height: 100%; |
|||
background: #a64bf4; |
|||
background: -webkit-linear-gradient(right, #21d4fd, #b721ff, #21d4fd, #b721ff); |
|||
background: -o-linear-gradient(right, #21d4fd, #b721ff, #21d4fd, #b721ff); |
|||
background: -moz-linear-gradient(right, #21d4fd, #b721ff, #21d4fd, #b721ff); |
|||
background: linear-gradient(right, #21d4fd, #b721ff, #21d4fd, #b721ff); |
|||
top: 0; |
|||
left: -100%; |
|||
|
|||
-webkit-transition: all 0.4s; |
|||
-o-transition: all 0.4s; |
|||
-moz-transition: all 0.4s; |
|||
transition: all 0.4s; |
|||
} |
|||
|
|||
.login100-form-btn { |
|||
font-family: Poppins-Medium; |
|||
font-size: 15px; |
|||
color: #fff; |
|||
line-height: 1.2; |
|||
text-transform: uppercase; |
|||
|
|||
display: -webkit-box; |
|||
display: -webkit-flex; |
|||
display: -moz-box; |
|||
display: -ms-flexbox; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
padding: 0 20px; |
|||
width: 100%; |
|||
height: 50px; |
|||
outline: none !important; |
|||
border: none; |
|||
background: transparent; |
|||
} |
|||
|
|||
.login100-form-btn:hover { |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.wrap-login100-form-btn:hover .login100-form-bgbtn { |
|||
left: 0; |
|||
} |
|||
|
|||
|
|||
/*------------------------------------------------------------------ |
|||
[ Responsive ]*/ |
|||
|
|||
@media (max-width: 576px) { |
|||
.wrap-login100 { |
|||
padding: 77px 15px 33px 15px; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
/*------------------------------------------------------------------ |
|||
[ Alert validate ]*/ |
|||
|
|||
.validate-input { |
|||
position: relative; |
|||
} |
|||
|
|||
.alert-validate::before { |
|||
content: attr(data-validate); |
|||
position: absolute; |
|||
max-width: 70%; |
|||
background-color: #fff; |
|||
border: 1px solid #c80000; |
|||
border-radius: 2px; |
|||
padding: 4px 25px 4px 10px; |
|||
top: 50%; |
|||
-webkit-transform: translateY(-50%); |
|||
-moz-transform: translateY(-50%); |
|||
-ms-transform: translateY(-50%); |
|||
-o-transform: translateY(-50%); |
|||
transform: translateY(-50%); |
|||
right: 0px; |
|||
pointer-events: none; |
|||
|
|||
font-family: Poppins-Regular; |
|||
color: #c80000; |
|||
font-size: 13px; |
|||
line-height: 1.4; |
|||
text-align: left; |
|||
|
|||
visibility: hidden; |
|||
opacity: 0; |
|||
|
|||
-webkit-transition: opacity 0.4s; |
|||
-o-transition: opacity 0.4s; |
|||
-moz-transition: opacity 0.4s; |
|||
transition: opacity 0.4s; |
|||
} |
|||
|
|||
.alert-validate::after { |
|||
content: "\f06a"; |
|||
font-family: FontAwesome; |
|||
font-size: 16px; |
|||
color: #c80000; |
|||
|
|||
display: block; |
|||
position: absolute; |
|||
background-color: #fff; |
|||
top: 50%; |
|||
-webkit-transform: translateY(-50%); |
|||
-moz-transform: translateY(-50%); |
|||
-ms-transform: translateY(-50%); |
|||
-o-transform: translateY(-50%); |
|||
transform: translateY(-50%); |
|||
right: 5px; |
|||
} |
|||
|
|||
.alert-validate:hover:before { |
|||
visibility: visible; |
|||
opacity: 1; |
|||
} |
|||
|
|||
@media (max-width: 992px) { |
|||
.alert-validate::before { |
|||
visibility: visible; |
|||
opacity: 1; |
|||
} |
|||
} |
|||
|
|||
/** util **/ |
|||
.p-b-26 {padding-bottom: 26px;} |
|||
.p-b-48 {padding-bottom: 48px;} |
|||
.p-t-115 {padding-top: 115px;} |
|||
|
|||
/**font**/ |
|||
/* .zmdi { |
|||
display: inline-block; |
|||
font: normal normal normal 14px/1 'Material-Design-Iconic-Font'; |
|||
font-size: 14px; |
|||
font-size: inherit; |
|||
text-rendering: auto; |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
} |
|||
.zmdi-font::before { |
|||
content: '\f16a'; |
|||
} |
|||
.login100-form-title i { |
|||
font-size: 60px; |
|||
} */ |
|||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1 @@ |
|||
var initializedJS=false;var Module={};function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;this.alert=threadAlert;Module["instantiateWasm"]=function(info,receiveInstance){var instance=new WebAssembly.Instance(Module["wasmModule"],info);Module["wasmModule"]=null;receiveInstance(instance);return instance.exports};function moduleLoaded(){}this.onmessage=function(e){try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob==="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}moduleLoaded()}else if(e.data.cmd==="objectTransfer"){Module["PThread"].receiveObjectTransfer(e.data)}else if(e.data.cmd==="run"){Module["__performance_now_clock_drift"]=performance.now()-e.data.time;Module["__emscripten_thread_init"](e.data.threadInfoStruct,0,0);var max=e.data.stackBase;var top=e.data.stackBase+e.data.stackSize;Module["establishStackSpace"](top,max);Module["_emscripten_tls_init"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].setThreadStatus(Module["_pthread_self"](),1);if(!initializedJS){Module["___embind_register_native_and_builtin_types"]();initializedJS=true}try{var result=Module["invokeEntryPoint"](e.data.start_routine,e.data.arg);if(!Module["getNoExitRuntime"]())Module["PThread"].threadExit(result)}catch(ex){if(ex==="Canceled!"){Module["PThread"].threadCancel()}else if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["getNoExitRuntime"]()){}else{Module["PThread"].threadExit(ex.status)}}else{Module["PThread"].threadExit(-2);throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["PThread"].threadCancel()}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processThreadQueue"){if(Module["_pthread_self"]()){Module["_emscripten_current_thread_process_queued_calls"]()}}else{err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){err("worker.js onmessage() captured an uncaught exception: "+ex);if(ex&&ex.stack)err(ex.stack);throw ex}}; |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 10 KiB |
Loading…
Reference in new issue