Commit d8132e4b authored by mengcuiguang2's avatar mengcuiguang2

优化api

parent f3daa0e9
......@@ -206,6 +206,21 @@ dependencies {
// TalkingDada(已集成)
// 数美
implementation files('libs/smantifraud.aar')
// 一览视频
implementation("com.yilan.sdk:ui:3.3.3.6") {
exclude group: 'com.yilan.sdk', module: 'yb_extra'
exclude group: 'com.yilan.sdk', module: 'gdt'
exclude group: 'com.yilan.sdk', module: 'ks'
}
implementation('com.aliyun.ams:alicloud-android-httpdns:1.2.3@aar') {
transitive true
}
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'
// 猎豹游戏
implementation(name: 'cmgame-sdk-tt3251-2.0.7', ext: 'aar')
implementation(name: 'x5fit-2.0.7', ext: 'aar')
......
This diff is collapsed.
......@@ -21,6 +21,7 @@ import com.mints.goodnews.manager.OwManager;
import com.mints.goodnews.manager.TtCsjAdManager;
import com.mints.goodnews.manager.TzManager;
import com.mints.goodnews.manager.WnManager;
import com.mints.goodnews.manager.YlVideoManager;
import com.mints.goodnews.manager.YlhAdManager;
import com.mints.goodnews.net.LoanService;
import com.mints.goodnews.utils.ForegroundOrBackground;
......@@ -116,6 +117,9 @@ public class MintsApplication extends MultiDexApplication {
// 移动安全联盟 oaid
initMiitHelper();
// 一览视频
YlVideoManager.INSTANCE.init(this);
// GroMore
CsjGroMoreManager.INSTANCE.init(this);
......
package com.mints.goodnews.ad.express
import android.widget.FrameLayout
import com.mingshu.goldcow.ad.express.GroMoreCarrierExpressManager
import com.mints.goodnews.ad.express.GroMoreCarrierExpressManager
import com.mints.goodnews.common.AppConfig
import com.mints.goodnews.manager.TtCsjAdManager
......
package com.mingshu.goldcow.ad.express
package com.mints.goodnews.ad.express
import android.os.Handler
import android.os.HandlerThread
......@@ -11,16 +11,16 @@ import android.widget.*
import com.bumptech.glide.Glide
import com.bytedance.msdk.api.*
import com.bytedance.msdk.api.nativeAd.*
import com.mingshu.goldcow.R
import com.mingshu.goldcow.WenshuApplication
import com.mingshu.goldcow.common.AppConfig
import com.mingshu.goldcow.common.Constant
import com.mingshu.goldcow.manager.CsjGroMoreManager
import com.mingshu.goldcow.manager.TrackManager
import com.mingshu.goldcow.ui.widgets.seekbar.BubbleUtils
import com.mingshu.goldcow.utils.LogUtil
import com.mingshu.goldcow.utils.UIUtils
import com.mingshu.goldcow.utils.VideoOptionUtil
import com.mints.goodnews.R
import com.mints.goodnews.MintsApplication
import com.mints.goodnews.common.AppConfig
import com.mints.goodnews.common.Constant
import com.mints.goodnews.manager.CsjGroMoreManager
import com.mints.goodnews.manager.TrackManager
import com.mints.goodnews.ui.widgets.seekbar.BubbleUtils
import com.mints.goodnews.utils.LogUtil
import com.mints.goodnews.utils.UIUtils
import com.mints.goodnews.utils.VideoOptionUtil
import java.util.ArrayList
import java.util.HashMap
......@@ -51,7 +51,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
fun loadADFrameLayout() {
// 销毁及移除事件
destroy()
frameLayout = FrameLayout(WenshuApplication.getContext())
frameLayout = FrameLayout(MintsApplication.getContext())
if (TTMediationAdSdk.configLoadSuccess()) {
loadAd()
......@@ -68,7 +68,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
private fun loadAd() {
mTTAdNative = TTUnifiedNativeAd(WenshuApplication.getContext(), CsjGroMoreManager.AD_UNIT_EXPRESS_ID)
mTTAdNative = TTUnifiedNativeAd(MintsApplication.getContext(), CsjGroMoreManager.AD_UNIT_EXPRESS_ID)
//视频声音控制设置
var videoOption: TTVideoOption = VideoOptionUtil.getTTVideoOption()
......@@ -205,7 +205,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
//渲染模板广告
private fun getExpressAdView(ad: TTNativeAd): View? {
val adViewHolder: ExpressAdViewHolder
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_native_express, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_native_express, null, false)
try {
adViewHolder = ExpressAdViewHolder()
adViewHolder.mAdContainerView = convertView.findViewById(R.id.iv_listitem_express) as FrameLayout
......@@ -250,7 +250,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
sWidth = FrameLayout.LayoutParams.MATCH_PARENT
sHeight = FrameLayout.LayoutParams.MATCH_PARENT
} else {
sWidth = UIUtils.getScreenWidth(WenshuApplication.getContext())
sWidth = UIUtils.getScreenWidth(MintsApplication.getContext())
sHeight = (sWidth * height / width).toInt()
}
if (video != null) {
......@@ -308,7 +308,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
* @return
*/
private fun getVerticalAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_vertical_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_vertical_pic, null, false)
val adViewHolder = VerticalAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById(R.id.tv_listitem_ad_source) as TextView
......@@ -331,7 +331,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mVerticalImage?.let { Glide.with(WenshuApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mVerticalImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
}
return convertView
}
......@@ -340,7 +340,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
private fun getVideoView(ad: TTNativeAd): View? {
val adViewHolder: VideoAdViewHolder
val viewBinder: TTViewBinder
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_large_video, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_large_video, null, false)
try {
adViewHolder = VideoAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
......@@ -397,7 +397,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
}
private fun getLargeAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_large_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_large_pic, null, false)
val adViewHolder = LargeAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mDescription = convertView.findViewById<View>(R.id.tv_listitem_ad_desc) as TextView
......@@ -420,13 +420,13 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
convertView.tag = adViewHolder
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mLargeImage?.let { Glide.with(WenshuApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mLargeImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
}
return convertView
}
private fun getGroupAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_group_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_group_pic, null, false)
val adViewHolder = GroupAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById(R.id.tv_listitem_ad_source) as TextView
......@@ -455,20 +455,20 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
val image2 = ad.imageList[1]
val image3 = ad.imageList[2]
if (image1 != null) {
adViewHolder.mGroupImage1?.let { Glide.with(WenshuApplication.getContext()).load(image1).into(it) }
adViewHolder.mGroupImage1?.let { Glide.with(MintsApplication.getContext()).load(image1).into(it) }
}
if (image2 != null) {
adViewHolder.mGroupImage2?.let { Glide.with(WenshuApplication.getContext()).load(image2).into(it) }
adViewHolder.mGroupImage2?.let { Glide.with(MintsApplication.getContext()).load(image2).into(it) }
}
if (image3 != null) {
adViewHolder.mGroupImage3?.let { Glide.with(WenshuApplication.getContext()).load(image3).into(it) }
adViewHolder.mGroupImage3?.let { Glide.with(MintsApplication.getContext()).load(image3).into(it) }
}
}
return convertView
}
private fun getSmallAdView(ad: TTNativeAd): View? {
val convertView = LayoutInflater.from(WenshuApplication.getContext()).inflate(R.layout.listitem_ad_small_pic, null, false)
val convertView = LayoutInflater.from(MintsApplication.getContext()).inflate(R.layout.listitem_ad_small_pic, null, false)
val adViewHolder = SmallAdViewHolder()
adViewHolder.mTitle = convertView!!.findViewById<View>(R.id.tv_listitem_ad_title) as TextView
adViewHolder.mSource = convertView.findViewById<View>(R.id.tv_listitem_ad_source) as TextView
......@@ -491,7 +491,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
bindData(convertView, adViewHolder, ad, viewBinder)
if (ad.imageUrl != null) {
adViewHolder.mSmallImage?.let { Glide.with(WenshuApplication.getContext()).load(ad.imageUrl).into(it) }
adViewHolder.mSmallImage?.let { Glide.with(MintsApplication.getContext()).load(ad.imageUrl).into(it) }
}
return convertView
}
......@@ -556,7 +556,7 @@ class GroMoreCarrierExpressManager : TTSettingConfigCallback {
adViewHolder.mSource?.text = if (TextUtils.isEmpty(ad.source)) "广告来源" else ad.source
val icon = ad.iconUrl
if (icon != null) {
adViewHolder.mIcon?.let { Glide.with(WenshuApplication.getContext()).load(icon).into(it) }
adViewHolder.mIcon?.let { Glide.with(MintsApplication.getContext()).load(icon).into(it) }
}
val adCreativeButton: Button? = adViewHolder.mCreativeButton
when (ad.interactionType) {
......
......@@ -13,7 +13,6 @@ import android.widget.TextView
import com.bumptech.glide.Glide
import com.kwad.sdk.api.*
import com.kwad.sdk.api.KsNativeAd.VideoPlayListener
import com.mingshu.goldcow.ad.express.KSADLoadSuccessListener
import com.mints.goodnews.MintsApplication
import com.mints.goodnews.R
import com.mints.goodnews.common.AppConfig
......
......@@ -4,8 +4,8 @@ import android.annotation.SuppressLint
import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
import com.mingshu.goldcow.ad.express.GroMoreExpressManager
import com.mingshu.goldcow.ad.express.YlhPreLoadExpressManager
import com.mints.goodnews.ad.express.GroMoreExpressManager
import com.mints.goodnews.ad.express.YlhPreLoadExpressManager
import com.mints.goodnews.MintsApplication
import com.mints.goodnews.common.AppConfig
import com.mints.goodnews.common.Constant
......
......@@ -99,6 +99,11 @@ public class YlhVideoAdManager extends BaseVideoAd {
}
@Override
public void onReward(Map<String, Object> map) {
}
@Override
public void onADClick() {//激励视频广告被点击
if (AppConfig.needReportClickAdEvent) {
......@@ -147,10 +152,6 @@ public class YlhVideoAdManager extends BaseVideoAd {
}
}
@Override
public void onReward() {
}
});
rewardVideoAD.loadAD();
......
......@@ -9,6 +9,7 @@ import com.bytedance.msdk.api.TTAdConfig;
import com.bytedance.msdk.api.TTAdConstant;
import com.bytedance.msdk.api.TTMediationAdSdk;
import com.bytedance.msdk.api.UserInfoForSegment;
import com.mints.goodnews.BuildConfig;
import com.mints.goodnews.MintsApplication;
import com.mints.goodnews.common.Constant;
import com.mints.library.utils.CommonUtils;
......
package com.mints.goodnews.manager
import android.app.Application
import com.yilan.sdk.ui.YLUIInit
import com.yilan.sdk.ui.configs.CommentConfig
import com.yilan.sdk.ui.configs.FeedConfig
import com.yilan.sdk.ui.configs.YLUIConfig
/**
* 描述:一览视频(好兔)
* 作者:孟崔广
*/
object YlVideoManager {
private const val ACCESSKEY = "yl1q5rcjsb05"
private const val ACCESSTOKEN = "9qitn62coocwcjjwhs95re24poaf9q7j"
fun init(application: Application) {
YLUIInit.getInstance()
.setCrashOpen(false)
.setApplication(application)
.setAccessKey(ACCESSKEY)
.setAccessToken(ACCESSTOKEN)
.build()
//页面个性化配置
YLUIConfig.getInstance() //抖音样式小视频配置
.littleLikeShow(true) //是否显示点赞
.littleShareShow(false) //是否显示分享
.littleShowGuide(true) //是否显示新手引导滑动浮层(第一次安装进入显示)
.littleComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
//feed流短视频样式配置
.videoComment(CommentConfig.CommentType.DISMISS_COMMENT) //评论,参数详见文档;
.videoLikeShow(false) //是否显示点赞
.videoShareShow(false) //是否显示分享
.followAvailable(false) //关注功能是否可用
.feedAvatarClickable(true) //头像是否支持点击跳转到作者页面
.feedPlayAuto(true) //feed自动播放
.feedSwipeRefreshEnable(true) //feed是否可以下拉刷新
FeedConfig.getInstance().playerStyle = FeedConfig.STYLE_FEED_PLAY //FeedConfig.STYLE_FEED_PLAY当前页面播放
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ public class FlowAdRulesBean implements Serializable {
private int YLH;
private int KS;
private int CSJ;
private int GROMORE;
public int getYLH() {
return YLH;
......@@ -22,4 +23,8 @@ public class FlowAdRulesBean implements Serializable {
public int getCSJ() {
return CSJ;
}
public int getGROMORE() {
return GROMORE;
}
}
......@@ -170,10 +170,13 @@ class KylPageAdapter(val kylPageList: MutableList<KylBean.Data>) :
val ttAdDislike = ad.getDislikeDialog(context as Activity?)
if (ttAdDislike != null) {
ad.getDislikeDialog(context as Activity?).setDislikeInteractionCallback(object : DislikeInteractionCallback {
override fun onSelected(position: Int, value: String) {
override fun onSelected(p0: Int, p1: String?, p2: Boolean) {
}
override fun onCancel() {}
override fun onRefuse() {}
override fun onShow() {
}
})
}
dislike.setOnClickListener { ttAdDislike!!.showDislikeDialog() }
......
......@@ -13,7 +13,6 @@ import androidx.fragment.app.FragmentTransaction
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.kwad.sdk.api.KsAdSDK
import com.kwad.sdk.api.KsContentPage
import com.kwad.sdk.api.KsScene
import com.mints.goodnews.MintsApplication
import com.mints.goodnews.R
......@@ -41,6 +40,10 @@ import com.mints.goodnews.ui.widgets.seekbar.BubbleUtils
import com.mints.goodnews.utils.LogUtil
import com.mints.goodnews.utils.TimeRender
import com.mints.library.utils.CommonUtils
import com.yilan.sdk.player.ylplayer.YLPlayerConfig
import com.yilan.sdk.player.ylplayer.callback.OnPlayerCallBack
import com.yilan.sdk.ui.configs.YLUIConfig
import com.yilan.sdk.ui.little.YLLittleVideoFragment
import kotlinx.android.synthetic.main.layout_red_bag.*
import kotlinx.android.synthetic.main.layout_red_box.*
import net.grandcentrix.tray.AppPreferences
......@@ -58,13 +61,10 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
private val ps by lazy { AppPreferences(context) }
// 快手视频相关
private var ksFragment: Fragment? = null
private var mKsContentPage: KsContentPage? = null
// 视频相关
private var rewardDoubleCoin = 0 // 大金币
private var rewardCoin = 0 // 小金币
private var littleVideoFragment: YLLittleVideoFragment? = null
private val videoMaxCount = 12 // 当前缓存视频id最大数
private val videoIdList by lazy { ArrayList<String>() }//记录播放的视频id
......@@ -82,7 +82,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
private var mRedBoxCoin = 0
private var mRedBoxCoinDouble = 0
override fun getContentViewLayoutID() = R.layout.fragment_main_first
override fun getContentViewLayoutID() = R.layout.fragment_main_horiz
override fun initViewsAndEvents() {
horizChannelPresenter.attachView(this)
......@@ -93,7 +93,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
}
override fun onHiddenChanged(hidden: Boolean) {
ksFragment?.onHiddenChanged(hidden)
littleVideoFragment?.onHiddenChanged(hidden)
if (hidden) {
onPause()
......@@ -119,8 +119,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
}
}
registerPlayerCallBack()
ksFragment?.onResume()
littleVideoFragment?.onResume()
}
}
......@@ -133,7 +132,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
pauseDownloadTime()
destroyTimerRedbox()
ksFragment?.onPause()
littleVideoFragment?.onPause()
if (isToCreateReward) {
// 防止界面切换 重置红包动画
......@@ -146,7 +145,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
override fun setUserVisibleHint(isVisibleToUser: Boolean) {
super.setUserVisibleHint(isVisibleToUser)
ksFragment?.userVisibleHint = isVisibleToUser
littleVideoFragment?.userVisibleHint = isVisibleToUser
}
override fun onDestroyView() {
......@@ -163,6 +162,8 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
override fun onDestroy() {
super.onDestroy()
// 广告回调解绑
YLUIConfig.getInstance().unRegisterAdListener()
YLPlayerConfig.config().unRegisterPlayerCallback()
horizChannelPresenter.detachView()
}
......@@ -236,100 +237,67 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
}
/**
* 快手视频初始化
* 一览视频初始化
*/
private fun showLittle() {
val adScene = KsScene.Builder(5746000026L).build()
mKsContentPage = KsAdSDK.getLoadManager().loadContentPage(adScene)
registerPlayerCallBack()
val transaction: FragmentTransaction = childFragmentManager.beginTransaction()
if (ksFragment == null) {
ksFragment = mKsContentPage?.fragment
transaction.add(R.id.yilan_fragment_frame_container, ksFragment!!, "ks_fragment")
val transaction: FragmentTransaction = supportFragmentManager.beginTransaction()
if (littleVideoFragment == null) {
littleVideoFragment = YLLittleVideoFragment.newInstance()
transaction.add(R.id.yilan_fragment_frame_container_horic, littleVideoFragment!!, YLLittleVideoFragment::class.java.simpleName)
} else {
transaction.show(ksFragment!!)
transaction.show(littleVideoFragment!!)
}
transaction.commitAllowingStateLoss()
}
registerPlayerCallBack()
}
private fun registerPlayerCallBack() {
mKsContentPage?.let {
it.setPageListener(object : KsContentPage.PageListener {
override fun onPagePause(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPagePause")
YLPlayerConfig.config().registerPlayerCallBack(object : OnPlayerCallBack {
override fun onStart(pager: String, videoid: String, p2: String?) {
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(videoid)
}
}
override fun onPageResume(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageResume")
}
override fun onPageEnter(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageEnter")
}
override fun onPageLeave(p0: KsContentPage.ContentItem?) {
LogUtil.d("onPageLeave")
}
})
// 视频播放回调
it.setVideoListener(object : KsContentPage.VideoListener {
override fun onVideoPlayCompleted(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayCompleted")
addVideoIdList(p0!!.id)
pauseDownloadTime()
}
override fun onVideoPlayPaused(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayPaused")
pauseDownloadTime()
}
override fun onPause(pager: String, p1: String?, p2: String?) {
pauseDownloadTime()
}
override fun onVideoPlayStart(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayStart")
override fun onResume(pager: String, videoid: String, p2: String?) {
resumeDownloadTime(videoid)
}
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(p0!!.id)
}
}
override fun onComplete(pager: String, videoid: String, p2: String?) {
override fun onVideoPlayError(p0: KsContentPage.ContentItem?, p1: Int, p2: Int) {
LogUtil.d("onVideoPlayError")
}
override fun onLoopComplete(pager: String?, videoID: String, taskID: String?, num: Int) {
// LogUtil.d(TAG, "registerPlayerCallBack onLoopComplete")
addVideoIdList(videoID)
pauseDownloadTime()
}
pauseDownloadTime()
}
override fun onStuckStart(pager: String, p1: String?, p2: String?) {
}
override fun onVideoPlayResume(p0: KsContentPage.ContentItem?) {
LogUtil.d("onVideoPlayResume")
override fun onStuckEnd(pager: String, p1: String?, p2: String?) {
}
// 防止网络异常时, 第一次加载倒计时红包
if (isFirstLoadVideo) {
isFirstLoadVideo = false
initTimeview()
} else {
resumeDownloadTime(p0!!.id)
}
}
override fun onError(pager: String, p1: String?, p2: String?) {
})
pauseDownloadTime()
}
}
override fun onStop(pager: String, p1: String?, p2: String?) {
// LogUtil.d(TAG, "registerPlayerCallBack onStop")
// pauseDownloadTime()
}
})
}
private fun initListener() {
......
......@@ -14,7 +14,6 @@ import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.daimajia.androidanimations.library.YoYo.YoYoString
import com.kwad.sdk.api.KsAdSDK
import com.kwad.sdk.api.KsContentPage
import com.kwad.sdk.api.KsScene
import com.mints.goodnews.MintsApplication
import com.mints.goodnews.R
......@@ -184,6 +183,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener {
private fun initExpress(flowAdRules: FlowAdRulesBean) {
PreLoadExpressManager.init(flowAdRules.csj, flowAdRules.ylh, flowAdRules.ks)
PreLoadExpressManager.init(flowAdRules.csj, flowAdRules.ylh, flowAdRules.ks, flowAdRules.gromore)
}
}
\ No newline at end of file
......@@ -1207,7 +1207,7 @@ class MyFragment : BaseFragment(),
}
private fun initExpress(flowAdRules: FlowAdRulesBean) {
PreLoadExpressManager.init(flowAdRules.csj, flowAdRules.ylh, flowAdRules.ks)
PreLoadExpressManager.init(flowAdRules.csj, flowAdRules.ylh, flowAdRules.ks, flowAdRules.gromore)
}
/**
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/yilan_fragment_frame_container_horic"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="@layout/layout_red_bag" />
<include layout="@layout/layout_red_box" />
</FrameLayout>
\ No newline at end of file
......@@ -5,7 +5,13 @@ buildscript {
google()
jcenter()
maven { url "https://jitpack.io" }
//添加一览视频 maven地址
maven {
url 'http://nexus.1lan.tv/repository/maven-releases/'
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
......@@ -18,7 +24,13 @@ allprojects {
google()
jcenter()
maven { url "https://jitpack.io" }
//添加一览 maven地址
maven {
url 'http://nexus.1lan.tv/repository/maven-releases/'
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases/'
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment