コード例 #1
0
  @AfterViews
  void init() {
    String videoLink = getIntent().getStringExtra("video_link");
    if (null == videoLink || "".equals(videoLink)) {
      mApplication.showMsg(MApplication.TOAST_ALERT, "抱歉,解析连接出现问题");
      return;
    }

    mHandler = new Handler();
    mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);

    sideVolume = (ImageView) sideSoundRoot.findViewById(R.id.value_img);
    sideBright = (ImageView) sideBrightRoot.findViewById(R.id.value_img);

    mGestureDetector = new GestureDetector(this, new SimpleGesture());

    initPlayer(videoLink);
  }
コード例 #2
0
 @Override
 public void onPlayerError(ExoPlaybackException e) {
   mApplication.showMsg(MApplication.TOAST_ALERT, "视频播放失败啦");
 }