Commit 0ced5cfe1e9b701c6d380fc284a4025015cb6506

Authored by wugian
1 parent efc38ecf

fix ads path empty

... ... @@ -12,9 +12,11 @@ import android.os.Handler;
12 12 import android.view.KeyEvent;
13 13 import android.view.View;
14 14 import android.widget.TextView;
  15 +import android.widget.Toast;
15 16 import android.widget.VideoView;
16 17 import com.gimi.common.cinema.model.Constant;
17 18 import com.gimi.common.cinema.utils.OpenMMUtils;
  19 +import com.gimi.common.cinema.utils.SambaFileCharge;
18 20 import com.gimi.common.cinema.utils.Utils;
19 21 import com.xgimi.gimicinema.R;
20 22
... ... @@ -48,6 +50,12 @@ public class AdsPreVideoPlayerActivity extends BaseActivity {
48 50 timeCount = (TextView) findViewById(R.id.promoteTv);
49 51 playUrl = getAdsVideoUrl();
50 52 videoPath = getIntent().getStringExtra(MOVIE_PLAY_PATH);
  53 + if (!SambaFileCharge.fileExist(playUrl)) {
  54 + Toast.makeText(this, "映前广告不存在,请设置", Toast.LENGTH_SHORT).show();
  55 + OpenMMUtils.openPlayer(AdsPreVideoPlayerActivity.this, videoPath, 0);
  56 + AdsPreVideoPlayerActivity.this.finish();
  57 + return;
  58 + }
51 59 Uri videoUri = Uri.parse(playUrl);
52 60 videoView.setVideoURI(videoUri);
53 61 videoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
... ...
Please register or login to post a comment