|
|
@@ -1,8 +1,10 @@
|
|
|
package com.yingyang.livebroadcast.activity.video
|
|
|
|
|
|
import android.annotation.SuppressLint
|
|
|
+import android.os.Bundle
|
|
|
import android.view.MotionEvent
|
|
|
import android.view.View
|
|
|
+import android.view.WindowManager
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
|
import com.tencent.liteav.demo.superplayer.SuperPlayerGlobalConfig
|
|
|
import com.tencent.liteav.demo.superplayer.SuperPlayerModel
|
|
|
@@ -24,6 +26,11 @@ class VideoPlayerActivity : BaseActivity<ActivityVideoPlayerBinding>(), View.OnT
|
|
|
private var title = ""
|
|
|
private var url = ""
|
|
|
|
|
|
+ override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
+ window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
|
|
+ super.onCreate(savedInstanceState)
|
|
|
+ }
|
|
|
+
|
|
|
override fun initViews() {
|
|
|
val videoUrl = intent.getStringExtra("url") ?: ""
|
|
|
title = intent.getStringExtra("title") ?: ""
|
|
|
@@ -84,12 +91,14 @@ class VideoPlayerActivity : BaseActivity<ActivityVideoPlayerBinding>(), View.OnT
|
|
|
v.startAnimation(getScaleAnimation())
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_UP -> {
|
|
|
v.startAnimation(getEndAnimation())
|
|
|
if (v.id == R.id.backLayout) {
|
|
|
finish()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_CANCEL -> {
|
|
|
if (v.id == R.id.backLayout) {
|
|
|
v.startAnimation(getEndAnimation())
|