浏览代码

commit by xulin
20190317

lyn 6 年之前
父节点
当前提交
08240d1b39
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 1 1
      app/build.gradle
  2. 6 2
      lib/src/main/java/com/hc/lib/video/MVideoPlayer.java

+ 1 - 1
app/build.gradle

@@ -21,7 +21,7 @@ android {
             abiFilters 'armeabi', 'armeabi-v7a'
         }
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-        buildConfigField 'int','platformType','2'   ////1:百事通,2:银河,3:未来
+        buildConfigField 'int','platformType','3'   ////1:百事通,2:银河,3:未来
     }
     buildTypes {
         debug {

+ 6 - 2
lib/src/main/java/com/hc/lib/video/MVideoPlayer.java

@@ -474,13 +474,17 @@ public class MVideoPlayer extends FrameLayout implements IVideoPlayer {
                     resumePlay();
                 }else{
                     if (event.getAction() == KeyEvent.ACTION_DOWN ) {
-                        pauseOrPlay(false);
+                        if(videoView.isPlaying()){
+                            pauseOrPlay(false);
+                        }
                     }
                 }
                 break;
             case KeyEvent.KEYCODE_ENTER:
                 if (event.getAction() == KeyEvent.ACTION_DOWN ) {
-                    pauseOrPlay(false);
+                    if(videoView.isPlaying()){
+                        pauseOrPlay(false);
+                    }
                 }
                 break;
             default: