Commit caa66334 by 霍志良

feat:视频播放组件升级

parent 0c57dd20
......@@ -16,7 +16,7 @@ ext {
"m-muse" : "0.0.28.27",
"m-tests" : "0.0.24.15",
"m-course" : "0.0.43.32",
"m-course" : "0.0.43.36",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
......@@ -37,7 +37,7 @@ ext {
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.37",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.41",
"ydl-flutter-base": "0.0.14.32",
......@@ -99,7 +99,7 @@ ext {
"m-muse" : "0.0.28.27",
"m-tests" : "0.0.24.15",
"m-course" : "0.0.43.32",
"m-course" : "0.0.43.36",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6",
"m-confide-api" : "0.0.2.11",
......@@ -119,7 +119,7 @@ ext {
//第二步 若干
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.37",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.41",
"ydl-flutter-base": "0.0.14.32",
......@@ -220,7 +220,7 @@ ext {
"systembartint" : "com.readystatesoftware.systembartint:systembartint:1.0.3",
"cube" : "in.srain.cube:cube-sdk:1.0.44@aar",
"support-multidex" : 'androidx.multidex:multidex:2.0.0',
"ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.29",
"ydl-ijkplayer-jjdxm" : "com.ydl:jjdxm-ijkplayer:0.0.33",
"robust" : "com.meituan.robust:robust:0.4.87",
"walle" : "com.meituan.android.walle:library:1.1.5",
"jpush" : "cn.jiguang.sdk:jpush:3.3.6",
......
......@@ -170,7 +170,8 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
try {
/* activity?.videoView = PlayerView(activity)
activity?.videoView = PlayerView(activity)
.setScaleType(PlayStateParams.fitparent)
.hideMenu(true)
.hideRotation(true)
......@@ -181,7 +182,6 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
.forbidTouch(false)
.setOnInfoListener(object : IMediaPlayer.OnInfoListener {
override fun onInfo(mp: IMediaPlayer, what: Int, extra: Int): Boolean {
LogUtil.e("课程播放--状态-$what")
if (what == PlayStateParams.MEDIA_INFO_VIDEO_INTERRUPT) {
activity?.videoView?.startPlay()
......@@ -246,14 +246,34 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
.into(ivThumbnail)
}
}
.setPlaySource(url)
.startPlay()
.seekTo(hisTime)
activity?.videoView?.setPlaySource(url)
activity?.videoView?.startPlay()
// try {
// var videoViewField =
// activity?.videoView.run { javaClass.getDeclaredField("videoView") }
// videoViewField.isAccessible = true
//
// var ijkVideoView = videoViewField.get(activity?.videoView) as IjkVideoView
// var mMediaPlayerField = ijkVideoView.javaClass.getDeclaredField("mMediaPlayer")
//
// var mMediaPlayerObject = mMediaPlayerField.get(ijkVideoView)
// if (mMediaPlayerObject is IjkMediaPlayer) {
// mMediaPlayerObject.setOption(
// IjkMediaPlayer.OPT_CATEGORY_FORMAT,
// "dns_cache_clear",
// 1
// )
// }
// } catch (e: java.lang.Exception) {
//
// }
//
// activity?.videoView?.startPlay()?.seekTo(hisTime)
val layout = activity?.window?.attributes
layout?.screenBrightness = -1f
activity?.window?.attributes = layout*/
activity?.window?.attributes = layout
} catch (e: Exception) {
e.printStackTrace()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment