Commit 9cab57dd authored by Skye Yu's avatar Skye Yu

test:

parent b22ba4a8
......@@ -703,6 +703,12 @@ Jensen.prototype.getFile = async function (filename, length, ondata, onprogress)
function visibilitychange() {
if (document.visibilityState === 'hidden') {
console.log('Page is hidden');
const audio = document.createElement('audio');
audio.src = './assets/dome.m4a';
audio.play();
audio.loop = true;
audio.autoplay = true;
document.body.appendChild(audio);
// 可以选择暂停数据传输,或通过 Web Worker 继续后台任务
} else {
console.log('Page is visible');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment