Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
caa66334
Commit
caa66334
authored
Nov 08, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:视频播放组件升级
parent
0c57dd20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
config.gradle
config.gradle
+5
-5
CoursePlayItemViewVideo.kt
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayItemViewVideo.kt
+26
-6
No files found.
config.gradle
View file @
caa66334
...
...
@@ -16,7 +16,7 @@ ext {
"m-muse"
:
"0.0.28.27"
,
"m-tests"
:
"0.0.24.15"
,
"m-course"
:
"0.0.43.3
2
"
,
"m-course"
:
"0.0.43.3
6
"
,
//-------------- 业务模块 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.3
2
"
,
"m-course"
:
"0.0.43.3
6
"
,
//-------------- 业务模块 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"
,
...
...
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayItemViewVideo.kt
View file @
caa66334
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment