aframe - Aframe 示例网络摄像头,但显示错误
问题描述
我尝试在我的网络上使用 A-frame 示例。但是,在移动设备上,出现错误。这是警报消息。
Webcam Error. Not Readable Error. Message:Could not start video source
我把这个例子源。我不知道,为什么一直显示此警报消息。我只是想在我的手机上测试一个例子。(我在这个网站上找到了这个例子 。https://github.com/AR-js-org/AR.js/blob/master/aframe/examples/marker-based/basic.html )
<script src="https://aframe.io/releases/1.0.0/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
<style>
.arjs-loader {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
}
.arjs-loader div {
text-align: center;
font-size: 1.25em;
color: white;
}
</style>
<div style='margin : 0px; overflow: hidden;'>
<a-scene embedded arjs>
<a-marker preset="hiro">
<a-entity
position="0 -0.5 0.5"
rotation="90 0 0"
scale="0.05 0.05 0.05"
gltf-model="https://arjs-cors-proxy.herokuapp.com/https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/scene.gltf"
></a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</div>
解决方案
推荐阅读
- javascript - 如何根据元素的旋转将元素的大小调整为光标?
- python - 在 vscode 中将 IPython 终端设置为默认值?
- python - 以对数尺度绘制度数分布
- c - 将存储在内存中的位图写入文件
- windows - Cordova,为 android 构建在 Windows 10 上找不到 gradle
- php - Symfony 5 - 存储库类从自定义 BaseRepository 类而不是 ServiceEntityRepository 扩展
- php - 需要php从文件夹和子文件夹中加载文件,然后排序结果添加到数组中
- swift - Swiftui 如何在 LazyVStack 中切换不同的元素
- c# - .NET Core 3.1 IHostBuilder Apache 托管与 Kestrel Program.cs 设置
- react-native - 如何在视频播放器中播放 admob 广告但不能全屏播放?