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
aae34a3e
Commit
aae34a3e
authored
Aug 10, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6464f500
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
compiler.xml
video/.idea/compiler.xml
+1
-1
DrawExpressManager.kt
...in/java/com/mints/helivideo/ad/draw/DrawExpressManager.kt
+13
-6
SuperShortVideoView.java
...ava/com/mints/helivideo/video/tx/SuperShortVideoView.java
+1
-0
No files found.
video/.idea/compiler.xml
View file @
aae34a3e
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1
.8
"
/>
<bytecodeTargetLevel
target=
"1
1
"
/>
</component>
</project>
\ No newline at end of file
video/app/src/main/java/com/mints/helivideo/ad/draw/DrawExpressManager.kt
View file @
aae34a3e
...
...
@@ -43,8 +43,6 @@ class DrawExpressManager {
private
var
expressId
:
String
=
""
private
var
isClickScreen
=
true
// 是否点击屏幕跳转广告
private
val
adLoadTime
:
Long
=
0
// 广告展示时间,45分钟后当前广告失效,重新预加载广告
private
var
adPreingTime
:
Long
=
0
// 防止预加载超时 2分钟
...
...
@@ -60,13 +58,23 @@ class DrawExpressManager {
private
var
adcode
=
""
private
var
ecpm
=
""
private
var
adSource
=
""
// private var mTTFeedAd: TTFeedAd? = null
fun
getAdIsLoadSuc
():
Boolean
{
isAdDestroy
()
val
isOversped
=
TimeRender
.
isOverspedMin
(
adLoadTime
,
AdManager
.
AD_NO_SHOWTIME_OUT
)
return
isLoadSuccess
==
2
&&
!
isOversped
}
private
fun
isAdDestroy
()
{
if
(
isLoadSuccess
==
2
&&
(
viewCache
.
isEmpty
()
||
ttFeedAdCache
.
isEmpty
()))
{
// 重置广告状态
isLoadSuccess
=
0
isShowAd
=
true
adShowTime
=
System
.
currentTimeMillis
()
}
}
fun
preLoadAd
()
{
val
isOversped
=
TimeRender
.
isOverspedMin
(
adLoadTime
,
AdManager
.
AD_NO_SHOWTIME_OUT
)
val
isPreingOversped
=
TimeRender
.
isOverspedMin
(
adPreingTime
,
AdManager
.
AD_REQUEST_TIME_OUT
)
...
...
@@ -90,7 +98,6 @@ class DrawExpressManager {
}
private
fun
loadAd
()
{
isClickScreen
=
true
expressId
=
BuildConfig
.
GROMORE_DRAW_CODE
val
activity
=
ForegroundOrBackground
.
getTopActivity
()
...
...
@@ -190,7 +197,6 @@ class DrawExpressManager {
isShowAd
=
true
adShowTime
=
System
.
currentTimeMillis
()
isLoadSuccess
=
0
isClickScreen
=
true
// callback?.loadSuccess(frameLayout)
if
(
viewCache
.
size
>
0
)
{
callback
?.
loadSuccess
(
viewCache
.
lastElement
())
...
...
@@ -246,7 +252,6 @@ class DrawExpressManager {
* 销毁
*/
fun
destroy
()
{
// 数据重置
adcode
=
""
ecpm
=
""
...
...
@@ -261,6 +266,8 @@ class DrawExpressManager {
ttFeedAd
.
destroy
()
}
ttFeedAdCache
.
clear
()
isAdDestroy
()
this
.
mExpressAdCallback
=
null
}
...
...
video/app/src/main/java/com/mints/helivideo/video/tx/SuperShortVideoView.java
View file @
aae34a3e
...
...
@@ -66,6 +66,7 @@ public class SuperShortVideoView extends RelativeLayout {
}
public
void
loadData
(
VedioBean
vedioBean
,
List
<
VideoMultiItemEntity
>
list
,
int
currentPosition
)
{
mLastPositionInIDLE
=
-
1
;
this
.
mList
.
clear
();
this
.
mList
=
list
;
this
.
mCurrentPosition
=
currentPosition
;
...
...
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