【发布时间】:2018-05-09 14:57:49
【问题描述】:
问题类似于Automatically play sound in IPython notebook - 不同之处在于我需要多次播放声音。在浏览器端 - 而不是服务器端。
最幼稚的做法:
IPython.display.Audio(url="http://www.w3schools.com/html/horse.ogg", autoplay=True)
time.sleep(10)
IPython.display.Audio(url="http://www.w3schools.com/html/horse.ogg", autoplay=True)
不起作用,因为它只播放一次声音。此外,IPython.display.Audio 对象似乎有必要作为单元格的输出,如:
IPython.display.Audio(url="http://www.w3schools.com/html/horse.ogg", autoplay=True)
None
没有声音。
不能将代码拆分为多个单元格。
【问题讨论】:
标签: python ipython jupyter-notebook jupyter