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
71af70a4
Commit
71af70a4
authored
Jul 13, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加预缓存
parent
f0cc5af9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
16 deletions
+17
-16
VideoActivity.kt
...rc/main/java/com/mints/wisdomclean/video/VideoActivity.kt
+6
-2
VideoAdapter.kt
...src/main/java/com/mints/wisdomclean/video/VideoAdapter.kt
+2
-2
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+9
-12
No files found.
video/app/src/main/java/com/mints/wisdomclean/video/VideoActivity.kt
View file @
71af70a4
...
...
@@ -181,8 +181,10 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
player
.
startVideoAfterPreloading
()
// VIdeoindex -> seeIndex
if
(
videos
.
size
>
mCurrentPosition
)
{
mVedioBean
!!
.
seeIndex
=
videos
[
mCurrentPosition
].
vedioIndex
LocalVedioManager
.
commitVedio
(
mVedioBean
!!
)
}
//播放开始,进行倒计时
}
...
...
@@ -362,6 +364,8 @@ class VideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
private
fun
showVipCountDialog
(
position
:
Int
)
{
if
(
isFinishing
)
return
if
(
mVedioBean
!!
.
tipMaxIndex
==
0
||
mVedioBean
!!
.
tipMaxIndex
-
1
<
position
)
{
autoPlayVideo
()
return
...
...
video/app/src/main/java/com/mints/wisdomclean/video/VideoAdapter.kt
View file @
71af70a4
...
...
@@ -101,8 +101,8 @@ class VideoAdapter(private var vedioBean: VedioBean) :
//缓存当前,播放当前
val
proxyUrl
=
proxy
?.
getProxyUrl
(
item
.
video
.
vedioUrl
).
toString
()
//设置视
//
setPlay(holder.getView(R.id.jz_video), proxyUrl)
setPlay
(
holder
.
getView
(
R
.
id
.
jz_video
),
item
.
video
.
vedioUrl
)
setPlay
(
holder
.
getView
(
R
.
id
.
jz_video
),
proxyUrl
)
//
setPlay(holder.getView(R.id.jz_video), item.video.vedioUrl)
}
fun
setPlay
(
jzvdStdTikTok
:
JzvdStdTikTok
,
path
:
String
)
{
...
...
video/app/src/main/res/layout/fragment_main.xml
View file @
71af70a4
...
...
@@ -153,8 +153,8 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"1
5
dp"
android:layout_marginRight=
"1
5
dp"
android:layout_marginLeft=
"1
0
dp"
android:layout_marginRight=
"1
0
dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/shape_bg_black"
>
...
...
@@ -173,10 +173,10 @@
<TextView
android:id=
"@+id/tv_main_watching_name"
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"8dp"
android:text=
"我去平行时空"
android:text=
"我去平行时空
我去平行时空
"
android:singleLine=
"true"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
...
...
@@ -203,30 +203,27 @@
</LinearLayout>
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
>
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
>
<ImageView
android:id=
"@+id/iv_main_watching_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:padding=
"
10
dp"
android:padding=
"
6
dp"
android:layout_alignParentRight=
"true"
android:src=
"@mipmap/ic_quit_white"
></ImageView>
<TextView
android:id=
"@+id/tv_main_watching_goto"
android:layout_width=
"1
2
0dp"
android:layout_width=
"1
0
0dp"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"30dp"
android:background=
"@drawable/shape_red"
android:layout_marginRight=
"15dp"
android:gravity=
"center"
android:paddingLeft=
"30dp"
android:paddingTop=
"8dp"
android:paddingRight=
"30dp"
android:paddingBottom=
"10dp"
android:text=
"继续观看"
android:textColor=
"@color/white"
...
...
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