Vrtigo Analytics package for React VR
npm install vrtigo-reactvrhttps://vrtigo.io
``shell`
npm install --save vrtigo-reactvr$3
`javascript`
const vrtigo = import vrtigo from 'vrtigo-reactvr';
vrtigo.setAppId('
vrtigo.setUserId('
Please contact
application.
Vrtigo collects and processes metrics in 360 video applications. The
vrtigo-reactvr package allows developers to integrate Vrtigo into
their React VR applications that make use of 360 content.
All data collection and submission are controlled by the Vrtigo API
functions in the table below. The start, unpause, seekEnd, andbufferEnd functions all require an integer representing the relativepositionMillis
play position of the video in milliseconds ().
The start function, called when a video initially starts playing,videoId
additionally requires a string indicating the video being viewed
().
It is important to instrument any event where the playback time
changes in the video, such as buffering and seeking/scrubbing, so that
the analytics are in sync with the viewer’s behavior.
You control when to send data to Vrtigo. To send data after video
playback ends, simply call the submit function after calling thestop function. *Important: call submit after calling stop and beforesubmit
calling start again.* The function returns a Promise object,catch` any potential errors when calling it.
so be sure to
| Action | API call |
| Start | vrtigo.start(videoId, positionMillis); |
| Stop | vrtigo.stop() |
| Pause | vrtigo.pause() |
| Unpause | vrtigo.unpause(positionMillis) |
| Seek begin | vrtigo.seekBegin() |
| Seek end | vrtigo.seekEnd(positionMillis) |
| Buffering begin | vrtigo.bufferBegin() |
| Buffering end | vrtigo.bufferEnd(positionMillis) |
| Submit data | vrtigo.submit() |