Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Aframe A帧本地视频无法显示_Aframe - Fatal编程技术网

Aframe A帧本地视频无法显示

Aframe A帧本地视频无法显示,aframe,Aframe,我想在同一台计算机上显示带有a帧的本地视频。但是,在浏览器上,没有显示任何内容,屏幕是黑色的(似乎没有渲染)。 我只是对360视频源代码做了一点修改,我是一个新的Web开发人员。所以请帮帮我,告诉我哪里错了。 我的源代码是: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>360 Video</title> <m

我想在同一台计算机上显示带有a帧的本地视频。但是,在浏览器上,没有显示任何内容,屏幕是黑色的(似乎没有渲染)。 我只是对360视频源代码做了一点修改,我是一个新的Web开发人员。所以请帮帮我,告诉我哪里错了。 我的源代码是:

<!DOCTYPE html>
<html>
<head>
      <meta charset="utf-8">
      <title>360 Video</title>
      <meta name="description" content="360 Video — A-Frame">
      <script src="../../../dist/aframe-master.js"></script>
</head>
<body>
  <a-scene>
    <a-assets>
      <!-- tt.mp4 is my video file and with index.html at the same folder -->
      <video id="video" src="tt.mp4" autoplay loop crossorigin></video>
    </a-assets>

  <a-videosphere src="#video" rotation="0 180 0"></a-videosphere>
</a-scene>

360视频

在本地执行此操作很困难,因为(尽管有
crossorigin
属性),您的浏览器可能不允许引用。我建议使用包含
index.php
文件启动本地php服务器。这样,您的php服务器就可以被识别为一个源。如果您在运行MacOS或Linux,我知道命令行命令只是来自项目目录的
php-S localhost:8000