Explorar o código

commit by xulin
20190317

lyn %!s(int64=6) %!d(string=hai) anos
pai
achega
08240d1b39
Modificáronse 2 ficheiros con 7 adicións e 3 borrados
  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: