我很努力地让音频到我的手机上玩的反应360.通过阅读各种文档中,我了解到,为了播放音频在移动,我需要制定一个HTML实体创建一个用户交互。一旦用户点击该按钮交互,音频应该能够在手机上玩。这似乎并不如此。
在我index.html
文件我有以下代码:
<html>
<head>
<title>ExampleVR</title>
<style>body { margin: 0; }</style>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
<!-- Attachment point for your app -->
<div id="container">
<button id="enter" onclick="enterApp();">
Click to Enter VR
</button>
</div>
<script src="./client.bundle?platform=vr"></script>
<script>
// Initialize the React 360 application
function enterApp() {
React360.init(
'index.bundle?platform=vr&dev=true',
document.getElementById('container'),
{
assetRoot: 'static_assets/',
}
);
}
</script>
</body>
</html>
正如你所看到的,我已经创建了HTML上午的按钮,点击后,负载我作出反应360码。然而,当我点击移动一个VrButton
,它仍然不能播放。我已经按照建议的文件,它适用于所有的浏览器在桌面与移动的除外。有谁知道如何解决这个问题?
这是修复音频问题的解决方案: