title: How to put a MediaController in a TextureView
body: <p>I'm trying to put a media controller in my texture view but I always have an error saying </p>
  
  <pre><code>E/MediaPlayer﹕ Should have subtitle controller already set
  </code></pre>
  
  <p>here is my code </p>
  
  <pre><code>    @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.texture_video);
  
      textureView = (TextureView) findViewById(R.id.textureView);
      listView = (ListView) findViewById(R.id.list);
  
    .
    .
    .
  
      ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_list_item_1, android.R.id.text1, values);
  
  
      listView.setAdapter(adapter);
      listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                                  int position, long id) {
  
              if (position == 0) {
                  onDestroy();
                  FILE_NAME = "test1.mp4";
                  textureView.setSurfaceTextureListener(VideoAssetActivity.this);
                  onSurfaceTextureAvailable(textureView.getSurfaceTexture(), view.getWidth(), view.getHeight());
              } else if (position == 1) {
                  onDestroy();
                  FILE_NAME = "test2.mp4";
                  textureView.setSurfaceTextureListener(VideoAssetActivity.this);
                  onSurfaceTextureAvailable(textureView.getSurfaceTexture(), view.getWidth(), view.getHeight());
              } else if (position == 2) {
                  onDestroy();
                  FILE_NAME = "test3.mp4";
                  textureView.setSurfaceTextureListener(VideoAssetActivity.this);
                  onSurfaceTextureAvailable(textureView.getSurfaceTexture(), view.getWidth(), view.getHeight());
              } else if (position == 3) {
                  onDestroy();
                  FILE_NAME = "test4.mp4";
                  textureView.setSurfaceTextureListener(VideoAssetActivity.this);
                  onSurfaceTextureAvailable(textureView.getSurfaceTexture(), view.getWidth(), view.getHeight());
              }
          }
  
      });
      textureView.setSurfaceTextureListener(this);
  
  }
  
  @Override
  protected void onDestroy() {
      super.onDestroy();
      if (mMediaPlayer != null) {
          mMediaPlayer.stop();
          mMediaPlayer.release();
          mMediaPlayer = null;
      }
  }
  
  @Override
  public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) {
      Surface surface = new Surface(surfaceTexture);
  
      try {
          AssetFileDescriptor afd = getAssets().openFd(FILE_NAME);
          mMediaPlayer = new MediaPlayer();
          mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
          mMediaPlayer.setSurface(surface);
          mMediaPlayer.setLooping(true);
          mMediaPlayer.prepareAsync();
  
          onSurfaceTextureUpdated(surfaceTexture);
  
          mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
              @Override
              public void onPrepared(MediaPlayer mediaPlayer) {
                  // set up media controller
                  videoController = new MediaController(VideoAssetActivity.this);
                  videoController.setAnchorView(textureView);
                  videoController.setPadding(0, 0, 0, 0);
  
                      mediaPlayer.start();
  
              }
          });
  
      } catch (IllegalArgumentException e) {
          Log.d(TAG, e.getMessage());
      } catch (SecurityException e) {
          Log.d(TAG, e.getMessage());
      } catch (IllegalStateException e) {
          Log.d(TAG, e.getMessage());
      } catch (IOException e) {
          Log.d(TAG, e.getMessage());
      }
  
  
  }
  </code></pre>
  
  <p>my problem is i already set the controller but it doesn't shows up even if i play other mp4.  I've searched for solution but i only see for audio file only. 
  can anyone help me? thank you very much..</p>