Closed binoculars88 closed 7 years ago
Hi, sorry the plugin isn't properly documented, but playVideo accepts an absolute path as a parameter. For example, to play a video stored in your app's www directory, you can use the following code (it requires Cordova File Plugin to be installed):
var path = cordova.file.applicationDirectory + 'www/video.mp4';
GoogleVRPlayer.playVideo(path);
Thanks! The error is gone and the video starts to play. However, there's a calibration problem. As a demo, I'm using the video from Google's dev page. In the app, it looks like this. As you can see, the floor and the sky are stitched together in the center. Any idea how to fix this?
The VRVideoView by default expects the video to be a monocular panorama. We ideally should pass this option as parameter, but temporarily you can put the following code here to support stereoscopic videos:
VrVideoView.Options options = new VrVideoView.Options();
options.inputType = VrVideoView.Options.TYPE_STEREO_OVER_UNDER;
videoWidgetView.loadVideo(fileUri, options);
Thanks!!! Works like a charm on both Android and iOS! Awesome plugin!
Thank you, glad it worked! Any pull requests are most welcome.
Where do I put the video file? I'm using Ionic 2 and put the video in the same folder as the file where I've put
GoogleVRPlayer.playVideo('shark.mp4');
, but this gives me an error after the player opens up:Any thoughts?