【问题标题】:Playing video using Google cardboard in Android在 Android 中使用 Google Cardboard 播放视频
【发布时间】:2015-08-13 03:44:45
【问题描述】:

我们如何使用 Google cardboard SDK 播放视频,就像在 Thomas Cook 360 Holiday VR App (http://visualise.com/2015/08/thomas-cook-360-holiday-vr-app-launches) 中完成的那样。我下载了“Pan Frame”插件并尝试将其集成到 Cardboard SDK 中。但是,我无法继续。有人知道正确的方法吗?

快速更新:

Pan Frame 支持启用立体视图的方法。我能够激活它以拆分模式播放视频,这是必需的。

documentation 中,据说导航可以是“Motion”或“Touch”。但是,我无法使用“运动”浏览 360 度视频。使用“触摸”导航有效。如何启用“Motion”导航,以便将其与 Google Cardboard 或其他 VR 耳机一起使用。

【问题讨论】:

  • 您是如何激活立体视图的?我尝试使用 PFAssetFactory 的“vr”方法,但它不起作用。说“屏幕尺寸不正确”

标签: android video-player google-cardboard


【解决方案1】:

我使用 Pan frame 插件来实现 360 视频。它按预期工作。 比努·保罗 如果陀螺传感器可用或不可用,我们必须使用测试设备。 您还必须使用 SENSOR_ACCELEROMETER 和 SENSOR_COMPASS。我可以给你检查这些传感器的代码示例,

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;
            }

一旦满足这些条件,就可以确定设备适用于 360 度视频。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2015-05-29
  • 2016-08-18
  • 1970-01-01
  • 2017-03-01
  • 1970-01-01
  • 2015-11-30
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多