|
|||||||||||||||
|
水调歌头 · 再用韵答李子永提干, 辛弃疾 ,宋代, 君莫赋《幽愤》,一语试相开:长安车马道上,平地起崔嵬。
// 状态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;
}
我愧渊明久矣,犹借此翁湔洗,素壁写《归来》。 斜日透虚隙,一线万飞埃。 断吾生,左持蟹,右持杯。 买山自种云树,山下斸烟莱。 百炼都成绕指,万事直须称好,人世几舆台。 刘郎更堪笑,刚赋看花回。 | |||||||||||||||
|