title: Video is not playing in Android TV Emulator
body: <p>I am developing an android TV application where I was working on the sample TV app given in android studio template. Here everything works fine, but on the video player screen, it shows 'Can't play this video' error in Android TV Emulator.</p>
  
  <p>Ref file <em>PlaybackOverlayActivity.java</em>=><em>onFragmentPlayPause()</em> (when we create new TV project in android studio)</p>
  
  <p>In demo, they used <strong>videoview</strong>. I also tried using <strong>surface view/ texture view</strong> to play video from a link, but it gives different errors like</p>
  
  <p>1.MediaPlayer: error (100, 0)</p>
  
  <p>2.MediaPlayer: Should have subtitle controller already set</p>
  
  <p>3.MediaPlayer: error (1, -38)</p>
  
  <p>I have already tried different solutions from different threads...</p>
  
  <p>Please check below code, its just for testing video playback. 
  I also have found that any emulator created from AVD can not play video by any of these methods.</p>
  
  <pre><code>public class MainActivity extends Activity implements TextureView.SurfaceTextureListener, MediaPlayer.OnPreparedListener {
  
  
          private MediaPlayer mMediaPlayer;
  
          private TextureView mPreview;
  
          private String path = "http://www.sample-videos.com/video/mp4/240/big_buck_bunny_240p_1mb.mp4";
  
          @Override
          public void onCreate(Bundle icicle) {
  
              super.onCreate(icicle);
  
              setContentView(R.layout.activity_main);
  
              mPreview = (TextureView) findViewById(R.id.surface);
              mPreview.setSurfaceTextureListener(this);
          }
  
          public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
              Surface s = new Surface(surface);
  
              try {
                  mMediaPlayer = new MediaPlayer();
                  mMediaPlayer.setSurface(s);
                  mMediaPlayer.setDataSource(this, Uri.parse(path));
                  mMediaPlayer.setOnPreparedListener(this);
                  mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
                  mMediaPlayer.prepare();
  
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }
  
          @Override
          public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
  
          }
  
          @Override
          public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
              return false;
          }
  
          @Override
          public void onSurfaceTextureUpdated(SurfaceTexture surface) {
  
          }
  
          @Override
          public void onPrepared(MediaPlayer mp) {
              mp.start();
          }
      }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/gSaha.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gSaha.png" alt="android-tv-cant-play-video"></a></p>
  
  <p>Also tell if there is any other way to test videos on Android TV Emulator. Thanks.</p>