请帮助我.我不能让视频正确显示在MindAR目标.事实证明,视频(和声音从视频)开始之前,相机发现目标.如何使视频启动时,只有相机发现目标,当相机失去目标-视频暂停.此外,我需要它在Android和iOS上正确显示.
下面是我的代码:
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mindar-image-aframe.prod.js"></script>
<script src="https://cdn.rawgit.com/mayognaise/aframe-chromakey-material/v1.2.0/dist/aframe-chromakey-material.min.js"></script>
</head>
<body>
<a-scene mindar-image="imageTargetSrc: https://cdn.jsdelivr.net/gh/hiukim/[email protected]/examples/image-tracking/assets/card-example/card.mind;" color-space="sRGB" renderer="colorManagement: true, physicallyCorrectLights" vr-mode-ui="enabled: false" device-orientation-permission-ui="enabled: false">
<a-camera position="0 0 0" look-controls="enabled: false"></a-camera>
<a-entity mindar-image-target="targetIndex: 0">
<a-video src="https://cdn.glitch.global/aac91519-95ff-4996-8909-e5c41f3cfff9/mov_bbb.mp4?v=1680745936939" position="0 0 0" height="1" width="1" rotation="0 0 0" id="vid"></a-video>
</a-entity>
</a-scene>
</body>
</html>
字符串
1条答案
按热度按时间xuo3flqw1#
你可以试试,在“a-scene”标签之间添加下面的代码。
字符串