Esempio n. 1
0
 public void pause() {
   if (nativeMode) {
     mVideoView.pause();
     mVideoView.setKeepScreenOn(false);
   } else {
     mVlcPlayer.pause();
     mSurfaceView.setKeepScreenOn(false);
   }
 }
Esempio n. 2
0
 public void play() {
   if (nativeMode) {
     mVideoView.start();
     mVideoView.setKeepScreenOn(true);
   } else {
     mVlcPlayer.play();
     mSurfaceView.setKeepScreenOn(true);
     // work around losing audio when pausing bug
     int sav = mVlcPlayer.getAudioTrack();
     mVlcPlayer.setAudioTrack(-1);
     mVlcPlayer.setAudioTrack(sav);
     //
   }
 }
Esempio n. 3
0
  public void start() {
    if (nativeMode) {
      mVideoView.start();
      mVideoView.setKeepScreenOn(true);
      normalWidth = mVideoView.getLayoutParams().width;
      normalHeight = mVideoView.getLayoutParams().height;
    } else {
      if (!mSurfaceReady) {
        TvApp.getApplication().getLogger().Error("Attempt to play before surface ready");
        return;
      }

      if (!mVlcPlayer.isPlaying()) {
        mVlcPlayer.play();
      }
    }
  }