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
Video Google VRView for Web-检测360°;视频结束_Video_Html5 Video_Google Vr_Webvr_360 Degrees - Fatal编程技术网

Video Google VRView for Web-检测360°;视频结束

Video Google VRView for Web-检测360°;视频结束,video,html5-video,google-vr,webvr,360-degrees,Video,Html5 Video,Google Vr,Webvr,360 Degrees,我的要求非常简单:我需要在当前运行的视频结束后立即使用Google VRView for Web加载另一个360°视频 中描述了4种类型的事件,但遗憾的是,视频结束时没有要检测的事件。我甚至找不到一个属性来禁用循环 有人能实现这样的东西吗 var-vrView=new-vrView.Player(“#vrView”{ 视频:“link/to/first video.mp4”, 这是真的吗 }); //我找不到这样的事件或其他解决方案 vrView.on('end',function(){ vr

我的要求非常简单:我需要在当前运行的视频结束后立即使用Google VRView for Web加载另一个360°视频

中描述了4种类型的事件,但遗憾的是,视频结束时没有要检测的事件。我甚至找不到一个属性来禁用循环

有人能实现这样的东西吗

var-vrView=new-vrView.Player(“#vrView”{
视频:“link/to/first video.mp4”,
这是真的吗
});
//我找不到这样的事件或其他解决方案
vrView.on('end',function(){
vrView.setContent({
视频:“link/to/second video.mp4”,
这是真的吗
});

});尽管文档显示了4种类型的事件,正如您所说的,GitHub上的源代码似乎实际上支持“ended”(结束)和其他一种类型的事件

您可以看到它在main.js中定义并在player.js中使用:

Player.prototype.onMessage=函数(事件){
var message=event.data;
如果(!message | |!message.type){
console.warn('接收到的消息没有类型');
返回;
}
var type=message.type.toLowerCase();
var data=message.data;
开关(类型){
案例“准备就绪”:
“模式更改”案例:
案例“错误”:
案例“点击”:
案件“结束”:
如果(类型=='ready'){
如果(数据!==未定义){
this.duration=data.duration;
}
}