Open binoculars88 opened 7 years ago
Failed to load video: The operation could not be completed
I'm getting the exact same vague error. I'm even using a sample mp4 taken directly from Google's VR SDK Samples github page so it's definitely not the video that's the issue.
@binoculars88 I fixed the issue that was affecting me but only for iOS. I also have it updated to use GVRSDK 1.16 (the latest as of writing this comment). The issue is definitely a Path issue and my fix seems to work for now.
Just place your video inside the www
folder as usual and use the path inside that folder (do not include the "www" in the location name). I've also added a third optional parameter to set the video type
GoogleVRPlayer.playVideo("videos/360.mp4", "videos/backup.mp4", "Mono");
GoogleVRPlayer.playVideo("videos/360.mp4", null); // defaults to StereoOverUnder
check out my fork for more info.
https://github.com/FranciscoG/cordova-vr-player
Will eventually update the Android side and submit a pull request when I do
I've downloaded a video file
myvideo.mp4
in the Documents folder usingcordova-plugin-file-transfer
(example:file:///var/mobile/Containers/Data/Application/A9B73639-...-...-...-.../Documents/path/to/downloads
). Next, I try to play it using:var path = cordova.file.documentsDirectory + 'path/to/downloads/myvideo.mp4';
GoogleVRPlayer.playVideo(path);
The console log shows that the
path
is the same as the download folder, but I'm getting this error:Failed to load video: The operation could not be completed
. Notice that it's NOT saying it can't find the file.Any thoughts?