You need to install GizmoVR player first
This window will be closed in sec
Download VR PlayerNo, thank youGizmoVR Contains a built-in VR player for easy playback of VR content.
Use the following code to launch the video in the player
GizmovrApi.openVideo({url: 'https://sample.gizmovr.com/videoinfo'})
This command will launch GizmoVR Video Player in full-screen mode, the configured layout is not displayed in this mode.
https://sample.gizmovr.com/videoinfo contains meta information for the video, the format of which is described below
The demo: https://sample.gizmovr.com/video/
The player can send both meta data with the format and the URL where this data is stored.
Format description
required fields
apiType* - type of API used, required field
can take the following values:
id* - an unsigned integer for on-site video identification, required field (warning)
sources* - an array of structures with video sources, the required video. Source video structure contains the following fields
title - video title displayed in the player
durationSeconds - video duration time in seconds, an integer
imageTimeline - structure with frame preview data
imageThumb - video preview frame (thumbnail)
ads - #Ads type structure with advertiser info
nextVideoUrl - URL for getting data structure (JSON format) for the next video
prevVideoUrl - URL for getting data structure (JSON format) for the previous video
format - video format data structure
url - video page URL, not in use
Example of a json structure
{
"apiType": "GIZMO",
"id": 1,
"title": "Ayutthaya - Easy Tripod Paint",
"sources": [
{
"title": "720p",
"fps": 24,
"size": 6087845,
"url": "https://sample.gizmovr.com/1.mp4",
"downloadUrl": "https://sample.gizmovr.com/1.mp4"
},
{
"width": 1920,
"height": 960,
"title": "960p",
"fps": 60,
"size": 302645172,
"url": "https://sample.gizmovr.com/sample-960.mp4",
"downloadUrl": "https://sample.gizmovr.com/sample-960.mp4",
"bitrate": "20151155",
"codec": "avc1",
"profile": "High",
"profileLevel": "41"
},
{
"width": 2880,
"height": 1440,
"title": "1440p",
"fps": 60,
"size": 302859938,
"url": "https://sample.gizmovr.com/sample-1440.mp4",
"downloadUrl": "https://sample.gizmovr.com/sample-1440.mp4",
"bitrate": "20165455",
"codec": "avc1",
"profile": "High",
"profileLevel": "41"
},
{
"width": 3840,
"height": 1920,
"title": "2k",
"fps": 60,
"size": 302990739,
"url": "https://sample.gizmovr.com/sample-2k.mp4",
"downloadUrl": "https://sample.gizmovr.com/sample-2k.mp4",
"bitrate": "20174164",
"codec": "avc1",
"profile": "High",
"profileLevel": "41"
}
],
"durationSeconds": 25,
"imageTimeline": {
"url": "https://sample.gizmovr.com/sprite.jpg",
"rows": 1,
"cols": 26
},
"imageThumb": "https://sample.gizmovr.com/thumb.png",
"ads": {
"url": "https://gizmovr.com",
"title": "GizmoVR"
},
"nextVideoUrl": "",
"prevVideoUrl": "",
"format": {
"framePacking": "NONE",
"angle": "360"
},
"url": "https://gizmovr.com/videos"
}
The demo: https://sample.gizmovr.com/video/
Starting a video with the current layout
GizmovrApi.setMedia({url: 'https://sample.gizmovr.com/videoinfo'})
Video format at https://sample.gizmovr.com/videoinfo, the same as described above
The GizmoVR event system allows you to configure the behavior of your app depending on the player events
Demo of events: https://test-api1.gizmovr.com/events/ in the demo example, you can test the event system and call them. Also, when opening the GizmoVR app, the actual log of the player events can be viewed
Events that you can subscribe to:
Setting up a custom application installation dialog
window.GizmovrApi.setCustomDialog(() => {
alert('GizmoVR is not installed');
});
In this example we set a callback function that will be called if you need to install the GizmoVR app.