From 98d81196c44bb308412c58f71a7ddb0e264dacd4 Mon Sep 17 00:00:00 2001 From: xiaoqiang Date: Fri, 31 Aug 2018 15:58:52 +0800 Subject: [PATCH] add version --- KsyunPlayerDemo/app/build.gradle | 4 ++-- .../com/ksyun/player/now/activity/LiveDisplayActivity.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/KsyunPlayerDemo/app/build.gradle b/KsyunPlayerDemo/app/build.gradle index b7bc34e..62cb740 100644 --- a/KsyunPlayerDemo/app/build.gradle +++ b/KsyunPlayerDemo/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.ksyun.player.demo" minSdkVersion 16 targetSdkVersion 22 - versionCode 222 - versionName "2.2.2" + versionCode 223 + versionName "2.2.3" ndk { abiFilters 'armeabi-v7a', 'arm64-v8a' diff --git a/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/activity/LiveDisplayActivity.java b/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/activity/LiveDisplayActivity.java index dd9ffe1..c6a92dd 100644 --- a/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/activity/LiveDisplayActivity.java +++ b/KsyunPlayerDemo/newplayerdemo/src/main/java/com/ksyun/player/now/activity/LiveDisplayActivity.java @@ -662,8 +662,10 @@ protected void onPause() { super.onPause(); if(toFloatingWindow){ video.removeView(FloatingPlayer.getInstance().getKSYTextureView()); - FloatingPlayer.getInstance().getKSYTextureView().setOnTouchListener(null); - FloatingPlayer.getInstance().getKSYTextureView().setVideoScalingMode(KSYMediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING); + if(FloatingPlayer.getInstance().getKSYTextureView() != null) { + FloatingPlayer.getInstance().getKSYTextureView().setOnTouchListener(null); + FloatingPlayer.getInstance().getKSYTextureView().setVideoScalingMode(KSYMediaPlayer.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING); + } }else{ FloatingPlayer.getInstance().getKSYTextureView().pause(); }