iPhone、JQTouch 和 HTML5 音频标签

发布于 2024-08-30 16:47:42 字数 623 浏览 1 评论 0原文

我遇到 JQTouch(最新测试版)和 html5 音频标签的问题 在“子页面”上 - 音频标签在任何页面转换之前起作用 完成,然后停止工作。

例如:

http://richardprice.dyndns.ws/test.html

http://richardprice.dyndns.ws/test2.html

是相同的,除了我交换“当前”两者之间的阶级 divs - 所有音频标签都播放相同的 mp3。

在 test.html 上,初始页面上的音频标签可以工作,但是当您 切换到第 2 页,该页面上的音频标签不会(有时 导致浏览器崩溃)。切换回第 1 页和音频标签 该页面上的已停止工作。

test2.html 是相同的测试,但初始页面相反,并且 同样的事情发生 - 第 2 页(现在是初始页面)播放 音频,页面 1 没有,切换回页面 2 会导致 音频不再工作。

想法?

I am having an issue with JQTouch (latest beta) and html5 audio tags
on 'sub pages' - the audio tag works before any page transitions are
done, and cease to work afterward.

For example:

http://richardprice.dyndns.ws/test.html

and

http://richardprice.dyndns.ws/test2.html

are identical other than I swap the "current" class between the two
divs - all the audio tags play the same mp3.

On test.html the audio tag on the initial page works, but when you
switch to Page 2 the audio tag on that page does not (and sometimes
results in a browser crash). Switch back to Page 1 and the audio tag
on that page has ceased to work.

test2.html is the same test but with the initial pages reversed, and
the same thing happens - Page 2 (now the initial page) plays the
audio, Page 1 does not, and switching back to Page 2 results in the
audio no longer working.

Thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

残龙傲雪 2024-09-06 16:47:42

也许是因为第 2 页上的音频标签没有布局(因为它的显示没有)。我以前见过这种行为,请参阅此处的评论。

您可以尝试通过 DOM (document.createElement('audio') ...) 在该页面的 pageAnimationEnd 事件上添加音频。

Perhaps it's because the audio tag on page 2 doesn't have layout (since its display is none). I've seen this behavior before, see comments here.

You might try adding the audio via DOM (document.createElement('audio') ...) on that page's pageAnimationEnd event.

堇年纸鸢 2024-09-06 16:47:42

我在JQTouch的r148上也遇到了同样的问题。我在网站的三个独立子页面上嵌入了 HTML5 音频。我第一次加载每个页面时,音频播放得很好(在 QuickTime、iPhone 3.1 中)。当我在同一会话中返回这些页面时,音频的 iPhone 链接有一条线穿过播放三角形。浏览器经常崩溃到主屏幕。

令人烦恼的是,iPad 中的音频播放器在这些 JQTouch 页面上运行得非常好。来来回回,装货又装货。

崩溃的 iPhone 播放器让我很担心,所以我不得不恢复到无聊的旧 a href 链接。我们距离发布日期太近了,无法尝试任何 JavaScript 解决方法。

I encountered the same problem with r148 of JQTouch. I had HTML5 audio embedded on three separate subpages of my site. The first time I loaded each page, the audio played fine (in QuickTime, iPhone 3.1). When I went back to those pages in the same session, the iPhone link to the audio had a line through the play triangle. Often the browser crashed to the home screen.

Annoyingly, the audio player in the iPad works perfectly on these JQTouch pages. Back and forth, loading and reloading.

The crashing iPhone player worried me, so I had to revert to a boring old a href link. We are too close to launch date to try any JavaScript workarounds.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文