Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完善并翻译 faq #1204

Merged
merged 1 commit into from
Apr 16, 2020
Merged

完善并翻译 faq #1204

merged 1 commit into from
Apr 16, 2020

Conversation

xunyi0
Copy link
Contributor

@xunyi0 xunyi0 commented Apr 16, 2020

No description provided.

@jareguo jareguo merged commit d3e784f into cocos:v2.3-release Apr 16, 2020
@@ -252,18 +252,19 @@ material.setProperty("diffuseTexture", texture);

受 Electron 底层 bug 影响,Mac 系统上 Cocos Creator 程序坞图标概率性变小。可以在终端上输入命令行:`defaults write com.apple.dock contents-immutable -bool false; killall Dock`,回车之后即可重启程序坞。

### 在 iOS 系统的 Web-Mobile 平台播放 Web Audio 音频,在手机切换前后台之后,大概率出现音频无法暂停和恢复播放的问题
### Audio 在 iOS 的浏览器上播放时,如果切换前后台,大概率会出现无法正常暂停和恢复播放的问题
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要特指 web Audio 因为 Dom Audio 没有这个问题。

-> Web Audio 在 iOS 的浏览器上播放时,如果切换前后台,大概率会出现无法正常暂停和恢复播放的问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 #1205 中修改


在 iOS 系统的 Web-Mobile 平台上,Web Audio 的 AudioScheduledSourceNode 在播放视频和音频之后,如果游戏切换前后台,音频将无法正常暂停和恢复播放。可以在项目脚本中加入如下代码修复。因为 WebAudioContext 的 Suspend 接口在 Web-Pc 平台只暂停指定 Audio,但在 Web-Mobile 平台会把所有 Audio 都暂停。故此在引擎上修复该问题过于 Hack 且不够通用,遂不做此修复。建议用户自行添加此修复代码解决问题。
这个问题是 Web Audio 的 `AudioScheduledSourceNode` 引起的。因为 `AudioContext` 的 `suspend` 方法在 Web Desktop 平台只会暂停 **指定的** Audio,而在 Web Mobile 平台会暂停 **所有的** Audio。<br>
在引擎上修复该问题过于 Hack 且不够通用,便不做修复,开发者可以通过在项目脚本中加入以下代码修复:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句话是对为什么不在引擎中修复的解释,所以这里应该不需要换行

PPpro pushed a commit to PPpro/creator-docs that referenced this pull request May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants