我想使用谷歌vrview-web使用这个例子:googlevrview如何在"iframe
"标签中设置src
属性?
下面是链接中给出的例子:
<iframe width="100%" scrolling="yes" allowfullscreen src="https://storage.googleapis.com/vrview/examples/video/index.html?video=examples/video/congo_2048.mp4&is_stereo=true"></iframe>
现在我必须在src中设置视频URL,如下所示:
<iframe width="100%" scrolling="yes" allowfullscreen src="<?php echo VIDEO_URL.$data["video"]; ?>&is_stereo=true"></iframe>
不显示视频
如果我在iframe
下面使用标签:
<iframe width="100%" scrolling="yes" allowfullscreen src="https://storage.googleapis.com/vrview/examples/video/index.html?video=MY_VIDEO&is_stereo=true"></iframe>
它仍然在my page中打印这些数据:
输出假设VIDEO_URL保存:
https://storage.googleapis.com/vrview/examples/video/index.html?video=
你的iframe不能只打印HTML。请检查您渲染的HTML/DOM或iframe src值是否正确且未被破坏。
此外,它是需要你的网站,在那里的视频,允许CORS。跨域资源共享。否则Google的脚本将不会在VR模式下将视频加载到iframe中。