Example #1
0
  @WXComponentProp(name = "playStatus")
  public void setPlaystatus(String playstatus) {

    if (mPrepared && !mError && !mStopped) {
      if (playstatus.equals("play")) {
        mVideoView.start();
      } else if (playstatus.equals("pause")) {
        mVideoView.pause();
      } else if (playstatus.equals("stop")) {
        mVideoView.stopPlayback();
        mStopped = true;
      }
    } else if ((mError || mStopped) && playstatus.equals("play")) {
      mError = false;
      mVideoView.resume();
      mProgressBar.setVisibility(View.VISIBLE);
    }
  }