|
||||||||||||
|
台城路, 张炎 ,宋代, 已十八年矣。因赋此词。
// 状态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;
}
十年前事翻疑梦,重逢可怜俱老。水国春空,山城岁晚,无语相看一笑。荷衣换了。任京洛尘沙,冷凝风帽。见说吟情,近来不到谢池草。 欢游曾步翠窈。乱红迷紫曲,芳意今少。舞扇招香,歌桡唤玉,犹忆钱塘苏小。无端暗恼。又几度留连,燕昏莺晓。回首妆楼,甚时重去好。 | ||||||||||||
|