代码拉取完成,页面将自动刷新
var monitor = {};
monitor.LOCK_ACTIVITY = "LOCK_ACTIVITY";
monitor.UN_LOCK_ACTIVITY = "UN_LOCK_ACTIVITY";
monitor.lockActivity = function(activity){
events.broadcast.emit(this.LOCK_ACTIVITY, activity);
}
monitor.unLockActivity = function(){
events.broadcast.emit(this.UN_LOCK_ACTIVITY);
}
monitor.alert = function(){
var w = floaty.rawWindow(
<frame id="frame" gravity="center" bg="#ffff0000">
<text id="example" text="" gravity="center" textSize="50sp" />
</frame>
);
media.playMusic(files.cwd() + "/gdt_hb/music/科技.mp3")
w.setSize(-1, -1);
// w.setTouchable(false);
// setTimeout(()=>{
// w.close();
// }, 60000);
var f = true;
var t = threads.start(function(){
sleep(3000);
media.playMusic(files.cwd() + "/gdt_hb/music/警报.mp3", 1, true)
while(true){
if (f) {
w.frame.attr("bg", "#00ff0000");
} else {
w.frame.attr("bg", "#ffff0000");
}
f = !f;
sleep(500);
}
})
// setTimeout(function(){
// clearInterval(id);
// }, 5000);
w.frame.on("click", function(){
media.stopMusic();
media.playMusic(files.cwd() + "/gdt_hb/music/科技.mp3");
t.interrupt();
});
}
module.exports = monitor;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。