【问题标题】:Help with capturing pause/resume with VideoView with MediaController after video starts帮助在视频开始后使用 VideoView 和 MediaController 捕获暂停/恢复
【发布时间】:2011-03-29 19:51:29
【问题描述】:

...

mVideoView = (VideoView) findViewById(R.id.video); mVideoView.setKeepScreenOn(true); 最终意图意图 = getIntent(); mHeadline = intent.getStringExtra("headline"); 字符串 liveVideoUrl = intent.getStringExtra("live_video_url"); mVideoView.setVideoPath(liveVideoUrl); mMediaController = new MediaController(this); mVideoView.setMediaController(mMediaController); mVideoView.start();

...

我需要捕捉用户按下暂停/播放按钮的时间。 VideoView 封装了媒体播放器,因此我如何捕获播放/暂停事件?谢谢。

【问题讨论】:

    标签: android


    【解决方案1】:

    创建一个扩展VideoView 的类,并在分配给mVideoView 的布局中使用该类。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-08
      • 2011-12-20
      相关资源
      最近更新 更多