Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能不是一个咆哮的问题,而是与 HTML5 如何处理嵌入播放的文件有关。
无论如何,在预取音频文件时,一旦网络断开,这些缓存的音频就无法使用;结果,当我尝试通过调用 Howler 来播放它们时,它不起作用。
另一方面,如果我先调用 Howler 并让它进行缓存,那么即使离线,缓存的文件仍然可以播放。
这是为什么?
我使用<link rel="prefetch" href="path_to_file" />,它似乎正在工作,因为文件出现在网络监视器活动中。
<link rel="prefetch" href="path_to_file" />