忆旧游(寄友),
张炎 ,宋代, 记琼筵卜夜,锦槛移春,同恼莺娇。暗水流花径,正无风院落,银烛迟销。闹枝浅压髫髻,香脸泛红潮。甚如此游情,还将乐事,轻趁冰消。
飘零又成梦,但长歌袅袅,柳色迢迢。一叶江心冷,望美人不见,隔浦难招。认得旧时鸥鹭,重过月明桥。溯万里天风,清声谩忆何处箫。
// 状态1:音频正在播放 → 暂停
if (audio && !audio.paused) {
audio.pause();
btn.innerText = "朗读";
btn.style.backgroundColor = '';
btn.style.color = '#000';
return;
}
// 状态2:音频已暂停 → 尝试继续播放,加catch兜底
if (audio && audio.paused) {
audio.play().then(()=>{
btn.innerText = "暂停";
btn.style.backgroundColor = 'green';
btn.style.color = 'white';
}).catch(e=>{
console.error("续播失败Safari限制:",e);
alert("苹果浏览器续播受限,将重新生成音频");
audio = null;
btn.innerText = "朗读";
btn.style.backgroundColor = '';
btn.style.color = '#000';
})
return;
}