台城路(抵吴,书寄旧友),
张炎 ,宋代, 分明柳上春风眼,曾看少年人老。雁拂沙黄,天垂海白,野艇谁家昏晓。惊心梦觉。谩慷慨悲歌,赋归不早。想得相如,此时终是倦游了。
经行岁度怨别,酒痕消未尽,空被花恼。茂苑重来,竹溪深隐,还胜飘零多少。羁怀顿扫。尚识得妆楼,那回苏小。寄语盟鸥,问春何处好。
// 状态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;
}