title: How to use RajawaliVR or Rajawali to play a 360 Video
body: <p>I am having a hard time to figure out how to use the Rajawali to play a 360 video. In order to achieve this, I tried every solution I could find in the Internet, but I failed.</p>
  
  <p>Firstly, I used the RajawaliCardboard, and let the MainActivity extend from <code>CardboardActivity</code>. At the same time, in <code>MyRenderer</code> class, I let this class extend from the <code>RajawaliCardboardRenderer</code> class. In <code>MyRenderer</code> class, I overrided the <code>initScene()</code> function:</p>
  
  <pre><code>protected void initScene() {
      StreamingTexture mTexture = null;
      if (externalMemoryAvailable())
      {
          mVideoPath = Environment.getExternalStorageDirectory().getAbsolutePath()+"/testVideo.mp4";
          try{
              mPlayer = new MediaPlayer();
              mPlayer.setDataSource(mVideoPath);
          }catch(IllegalArgumentException e){
          e.printStackTrace();
          } catch (SecurityException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IllegalStateException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          try {
              mPlayer.prepare();
          } catch (IOException t) {
              t.printStackTrace();
          }
          mTexture = new StreamingTexture("video", mPlayer);
      }
      Sphere sphere = createPhotoSphereWithTexture(mTexture);
      getCurrentScene().addChild(sphere);
      getCurrentCamera().setPosition(Vector3.ZERO);
      getCurrentCamera().setFieldOfView(75);
  }
  
  private  Sphere createPhotoSphereWithTexture(ATexture texture) {
      Material material = new Material();
      material.setColor(0);
      try {
          material.addTexture(texture);
      } catch (ATexture.TextureException e) {
          throw new RuntimeException(e);
      }
      Sphere sphere = new Sphere(50, 64, 32);
      sphere.setScaleX(-1);
      sphere.setMaterial(material);
      return sphere;
  }
  </code></pre>
  
  <p>The program can run without any error, but the screen is black and with no image.<br>
  I want to ask what should I do to improve my program, and why I should do to play video by using Rajawali. Who can help me?</p>