Web Audio API与IOS和Phonegap导致从后台恢复时崩溃 [英] Web Audio API with IOS and Phonegap causes crash on resume from background

查看:160
本文介绍了Web Audio API与IOS和Phonegap导致从后台恢复时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是黑暗中的一个镜头,但在这里它是:



我有一个HTML5游戏运行伟大的iPhone使用Phonegap。



我使用Web Audio API添加了音频(支持ios 6版本)。这也很好,除非我退出应用程序,然后重新打开应用程序(从背景)。



恢复后,应用程式暂停然后发生崩溃。



其他资讯




  • 我在使用howler.js框架的音频后首次注意到了这一点。我删除了这个,并尝试了Web音频API的最基本的准系统示例,但问题仍然存在。


  • 我在iOS上使用Phonegap 2.5.0测试6.1.2和iPhone5。


  • 由于某种原因连接到xcode时无法通过xcode调试,应用程序将在恢复时暂停,但不会崩溃。 (因此只有在主屏幕上的图标运行时才会崩溃)


  • 我认为我将其固定到 ctx.createBufferSource )调用。







如果任何人遇到相同或甚至有解决方案,我很高兴听到!



感谢

j。

解决方案

更新到新版本的xcode,问题就消失了。



我相信这不是手机差距问题,而是xcode / ios中的错误。 >

This might be a shot in the dark but here it goes:

I have an HTML5 game running great on iPhone using Phonegap.

I added audio using Web Audio API (which as of ios 6 is supported). This too works well, except when I exit the app then re-open the app (from being "Backgrounded").

Upon resuming, the app now pauses then crashes.

Some other info

  • I first noticed this after using the howler.js framework for audio. I removed this and tried the most basic barebones example of Web Audio API and the problem still persists.

  • I'm testing this with Phonegap 2.5.0 on iOS 6.1.2 and an iPhone5.

  • Can't debug through xcode as for some reason when connected to xcode, the app will still pause upon resume but will not crash. (so only crashes when run from the icon on the home screen)

  • I think I pinned it down to the ctx.createBufferSource() call.


If anyone else has experienced the same or even has a solution, I'd love to hear!

Thanks
j.

解决方案

Updated to new version of xcode and the problem is gone.

I'm fairly confident this is not a phone gap issue but a bug in xcode/ios.

这篇关于Web Audio API与IOS和Phonegap导致从后台恢复时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆