Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
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
android
android_vedio
Commits
571e229f
Commit
571e229f
authored
Jul 19, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
b0c526b3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
15 deletions
+28
-15
proguard-rules.pro
video/app/proguard-rules.pro
+0
-10
DramaApiDetailActivity.kt
.../java/com/xinfu/helivideo/video/DramaApiDetailActivity.kt
+25
-3
SuperShortVideoView.java
...ava/com/xinfu/helivideo/video/tx/SuperShortVideoView.java
+2
-1
item_follow.xml
video/app/src/main/res/layout/item_follow.xml
+1
-1
No files found.
video/app/proguard-rules.pro
View file @
571e229f
...
...
@@ -480,16 +480,6 @@
-keep class
*
*.R$* { public static final int mbridge*; }
# ======================= 穿山甲 GroMore END ================
-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
-keep class tv.danmaku.ijk.media.player.
*
* {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.
*
* { *; }
# ======================= 腾讯播放器 END ================
-keep class com.tencent.
*
* { *; }
# ======================= 腾讯播放器 END ================
video/app/src/main/java/com/xinfu/helivideo/video/DramaApiDetailActivity.kt
View file @
571e229f
...
...
@@ -118,7 +118,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
override
fun
initViewsAndEvents
()
{
videoPresenter
.
attachView
(
this
)
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
it
.
thirdId
,
true
)
}
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
it
.
thirdId
,
true
)
}
fm_bottom
.
setOnClickListener
{
if
(
AntiShake
.
check
(
it
.
id
))
return
@setOnClickListener
...
...
@@ -148,9 +148,11 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
info_tv
.
text
=
String
.
format
(
"第%d集"
,
it
.
index
+
1
)
unlock
.
text
=
String
.
format
(
"看广告解锁%d集"
,
lockSet
)
if
(
mVedioBean
!!
.
collect
==
0
)
{
zan_iv
.
setImageResource
(
R
.
mipmap
.
home_collect_img_0
)
setCollectImage
(
zan_iv
)
// zan_iv.setImageResource(R.mipmap.home_collect_img_0)
}
else
{
zan_iv
.
setImageResource
(
R
.
mipmap
.
home_collect_img_1
)
setCancelCollectImage
(
zan_iv
)
// zan_iv.setImageResource(R.mipmap.home_collect_img_1)
}
zan_num_tv
.
text
=
mVedioBean
!!
.
hot
}
...
...
@@ -611,4 +613,24 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
.
show
()
}
private
fun
setCollectImage
(
view
:
LottieAnimationView
)
{
val
lottieDrawable
=
LottieDrawable
()
LottieCompositionFactory
.
fromAsset
(
context
,
"home_collect.json"
)
.
addListener
{
result
:
LottieComposition
?
->
lottieDrawable
.
setImagesAssetsFolder
(
"images/"
)
lottieDrawable
.
composition
=
result
}
view
.
setImageDrawable
(
lottieDrawable
)
}
private
fun
setCancelCollectImage
(
view
:
LottieAnimationView
)
{
val
lottieDrawable
=
LottieDrawable
()
LottieCompositionFactory
.
fromAsset
(
context
,
"home_cancel_collect.json"
)
.
addListener
{
result
:
LottieComposition
?
->
lottieDrawable
.
setImagesAssetsFolder
(
"images/"
)
lottieDrawable
.
composition
=
result
}
view
.
setImageDrawable
(
lottieDrawable
)
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/video/tx/SuperShortVideoView.java
View file @
571e229f
...
...
@@ -146,6 +146,7 @@ public class SuperShortVideoView extends RelativeLayout {
if
(
position
==
mUrlList
.
size
())
{
if
(
mBaseItemView
!=
null
)
{
mLastPositionInIDLE
=
-
1
;
mBaseItemView
.
stopForPlaying
();
}
return
;
...
...
@@ -161,7 +162,7 @@ public class SuperShortVideoView extends RelativeLayout {
List
<
VideoModel
>
tempUrlList
=
initUrlList
(
position
,
MAX_PLAYER_COUNT_ON_PASS
);
mPlayerManager
.
updateManager
(
tempUrlList
);
TXVodPlayerWrapper
txVodPlayerWrapper
=
mPlayerManager
.
getPlayer
(
mUrlList
.
get
(
position
));
if
(
txVodPlayerWrapper
!=
null
)
{
if
(
txVodPlayerWrapper
!=
null
)
{
Log
.
i
(
TAG
,
"txVodPlayerWrapper "
+
txVodPlayerWrapper
+
"url-- "
+
mUrlList
.
get
(
position
).
videoURL
);
Log
.
i
(
TAG
,
"txVodPlayerWrapper "
+
txVodPlayerWrapper
);
mBaseItemView
.
setTXVodPlayer
(
txVodPlayerWrapper
);
...
...
video/app/src/main/res/layout/item_follow.xml
View file @
571e229f
...
...
@@ -2,7 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
206dp
"
android:layout_marginLeft=
"3dp"
android:layout_marginRight=
"3dp"
android:layout_marginBottom=
"10dp"
>
...
...
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