Reputation: 127
How can we play video using Google cardboard SDK like that is done in Thomas Cook 360 Holiday VR App (http://visualise.com/2015/08/thomas-cook-360-holiday-vr-app-launches). I downloaded the 'Pan Frame' plugin and tried to integrate it to the cardboard SDK. But, I was not able to proceed. Does anybody know the right method?
Quick Update:
Pan Frame supports a method to enable stereo view. I was able to activate that to get the video played in split mode, which was required.
In the documentation, it is said that the navigation can be either 'Motion' or 'Touch'. But, I was not able to navigate the 360 video using 'Motion'. Navigating with 'Touch' worked. How can I enable the 'Motion' navigation so that I can use it with Google cardboard or other VR headsets.
Upvotes: 0
Views: 1230
Reputation: 101
I have used Pan frame plugin to achieve 360 video. Its works as expected. Binu Paul, We have to use testing device if gyro sensor is available or not.. You have to SENSOR_ACCELEROMETER & SENSOR_COMPASS also. I can give you code sample for checking these sensors,
PackageManager pm = getPackageManager();
//checking OPENGLES VERSION 2.0 OR NOT
final ActivityManager activityManager =
(ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
final ConfigurationInfo configurationInfo =
activityManager.getDeviceConfigurationInfo();
final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000;
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) &&
pm.hasSystemFeature(PackageManager.FEATURE_SENSOR_ACCELEROMETER) &&
pm.hasSystemFeature(PackageManager.FEATURE_SENSOR_COMPASS) &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH &&
supportsEs2) {
//Toast.makeText(Activity.this,"This device does support 360 video feature",Toast.LENGTH_LONG).show();
}else { //Toast.makeText(Activity.this,"Not support 360 video feature",Toast.LENGTH_LONG).show();
return;
}
Once these conditions are satisfied, sure device works for 360 video.
Upvotes: 0