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
b9dd1b14
Commit
b9dd1b14
authored
Jul 28, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
c64bce5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
TXVodPlayerWrapper.java
...java/com/mints/helivideo/video/tx/TXVodPlayerWrapper.java
+5
-4
TxRecommendVideo2Adapter.kt
...ts/helivideo/video/tx/adapter/TxRecommendVideo2Adapter.kt
+1
-1
No files found.
video/app/src/main/java/com/mints/helivideo/video/tx/TXVodPlayerWrapper.java
View file @
b9dd1b14
...
...
@@ -9,6 +9,7 @@ import android.content.Context;
import
android.os.Bundle
;
import
android.util.Log
;
import
com.mints.helivideo.utils.LogUtil
;
import
com.tencent.rtmp.ITXVodPlayListener
;
import
com.tencent.rtmp.TXPlayerGlobalSetting
;
import
com.tencent.rtmp.TXVodConstants
;
...
...
@@ -104,7 +105,7 @@ public class TXVodPlayerWrapper implements ITXVodPlayListener {
public
void
resumePlay
()
{
Log
.
i
(
TAG
,
"[resumePlay] , startOnPrepare, "
+
mStartOnPrepare
+
" mVodPlayer "
+
mVodPlayer
.
hashCode
()
+
" url "
+
mUrl
);
+
" mVodPlayer "
+
mVodPlayer
.
hashCode
()
+
" url "
+
mUrl
+
" status "
+
mStatus
);
if
(
mStatus
==
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_STOPPED
)
{
mVodPlayer
.
setAutoPlay
(
true
);
mVodPlayer
.
startVodPlay
(
mUrl
);
...
...
@@ -113,11 +114,11 @@ public class TXVodPlayerWrapper implements ITXVodPlayListener {
}
if
(
mStatus
==
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_PREPARED
||
mStatus
==
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_PAUSED
)
{
mVodPlayer
.
resume
();
playerStatusChanged
(
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_PLAYING
);
if
(
mOnPlayEventChangedListener
!=
null
)
{
if
(
mStatus
==
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_PAUSED
&&
mOnPlayEventChangedListener
!=
null
)
{
mOnPlayEventChangedListener
.
onResume
();
}
mVodPlayer
.
resume
();
playerStatusChanged
(
TxVodStatus
.
TX_VIDEO_PLAYER_STATUS_PLAYING
);
}
else
{
mStartOnPrepare
=
true
;
}
...
...
video/app/src/main/java/com/mints/helivideo/video/tx/adapter/TxRecommendVideo2Adapter.kt
View file @
b9dd1b14
...
...
@@ -102,7 +102,7 @@ class TxRecommendVideo2Adapter :
super
.
onViewDetachedFromWindow
(
holder
)
if
(
holder
.
itemViewType
==
MULTI_ITEM_1
)
{
val
tXVideoBaseView
=
holder
.
getView
<
TXVideoBaseView
>(
R
.
id
.
baseItemView
)
if
(
data
[
mCurrentPosition
].
itemType
==
MULTI_ITEM_1
||
tXVideoBaseView
.
player
!=
null
)
{
if
(
data
[
mCurrentPosition
].
itemType
==
MULTI_ITEM_1
&&
tXVideoBaseView
.
player
!=
null
)
{
if
(
tXVideoBaseView
.
player
.
url
!=
data
[
mCurrentPosition
].
video
!!
.
recommendUrl
)
{
tXVideoBaseView
.
stopForPlaying
()
}
...
...
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