예제 #1
0
 public void pause() {
   if (nativeMode) {
     mVideoView.pause();
     mVideoView.setKeepScreenOn(false);
   } else {
     mVlcPlayer.pause();
     mSurfaceView.setKeepScreenOn(false);
   }
 }
예제 #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);
     //
   }
 }
예제 #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();
      }
    }
  }