[视频优先级、视频下载]
This commit is contained in:
yangyakun
2024-08-19 19:29:33 +08:00
parent 1313696900
commit a57dcc151d
11 changed files with 397 additions and 42 deletions

View File

@@ -0,0 +1,114 @@
package com.mogo.och.common.module.manager.download
import android.annotation.SuppressLint
import android.content.Context
import android.os.Environment
import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.function.call.chat.CallerChatManager
import com.mogo.eagle.core.utilcode.download.DownloadUtils
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
import com.mogo.eagle.core.utilcode.kotlin.lifeCycleScope
import com.mogo.eagle.core.utilcode.util.StringUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.mogo.och.common.module.manager.loop.BizLoopManager
import com.mogo.och.common.module.manager.loop.LoopInfo
import com.mogo.och.common.module.utils.FileUtils
import com.mogo.och.common.module.wigets.media.MediaFileCacheManager.getCacheFileName
import io.reactivex.schedulers.Schedulers
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.asCoroutineDispatcher
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
import java.io.File
@SuppressLint("StaticFieldLeak")
object DownloadManager {
private const val TAG = "DownloadManager"
private val waitDownLoadList = mutableListOf<OchDownLoad>()
private val context: Context?=AbsMogoApplication.getApp()
init {
BizLoopManager.setLoopFunction(TAG, LoopInfo(5*60, ::go2Download, scheduler = Schedulers.io()))
}
/**
* 获取本地缓存文件的文件全路径
*/
private fun getFileCacheDir(): String {
// 有些手机需要通过自定义目录
val relativePath = "mogo" + File.separator + "media" + File.separator
val cacheDir = File(Environment.getExternalStorageDirectory(), relativePath)
if (com.mogo.eagle.core.utilcode.util.FileUtils.createOrExistsDir(cacheDir)) {
return cacheDir.absolutePath
}
return FileUtils.getCacheDirectory(context, "") + relativePath
}
fun downloadVideoFile(mediaUrl: String, listener: IDownloadListener?) {
val downloadUrl = mediaUrl
val downloadDir = getFileCacheDir()
val downloadFileName = getCacheFileName(mediaUrl)
waitDownLoadList.add(OchDownLoad(downloadUrl,downloadDir,downloadFileName,listener))
if(waitDownLoadList.size==1){
go2Download()
}
}
private fun go2Download(){
if(waitDownLoadList.isEmpty()){
return
}
val first = waitDownLoadList.first()
OchChainLogManager.writechainLogDownload("准备下周","信息:${first}")
DownloadUtils.downLoad(
context,
first.downloadUrl,
first.downloadDir,
first.downloadFileName,
object :IDownloadListener{
override fun onStart(url: String) {
OchChainLogManager.writechainLogDownload("开始下载","url:${url}")
first.listener?.onStart(url)
}
override fun onProgress(url: String, downloaded: Long, total: Long) {
first.listener?.onProgress(url,downloaded,total)
OchChainLogManager.writechainLogDownload("下载中","url:${url}_downloaded${downloaded}_total:${total}",upload = false)
}
override fun onFinished(url: String, path: String) {
first.listener?.onFinished(url,path)
OchChainLogManager.writechainLogDownload("下载结束","url:${url}---path:${path}")
waitDownLoadList.removeFirst()
go2Download()
}
override fun onError(url: String, error: String?) {
first.listener?.onError(url,error)
OchChainLogManager.writechainLogDownload("下载错误","url:${url}---error:${error}")
if(first.downLoadCount>=5){
OchChainLogManager.writechainLogDownload("下载错误5次可终点关注","url:${url}---error:${error}")
waitDownLoadList.removeFirst()
go2Download()
return
}
first.downLoadCount++
go2Download()
}
}
)
}
}

View File

@@ -0,0 +1,6 @@
package com.mogo.och.common.module.manager.download
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
import java.util.UUID
data class OchDownLoad(val downloadUrl:String, val downloadDir:String, val downloadFileName:String, val listener: IDownloadListener?, var downLoadCount:Int = 0)

View File

@@ -33,10 +33,16 @@ object OchChainLogManager {
// 网络接口
const val EVENT_KEY_INFO_Net = "event_key_och_net"
// 下载日志
const val EVENT_KEY_INFO_Download = "event_key_och_download"
// 初始化信息
const val EVENT_KEY_INFO_INIT = "event_key_och_init"
// 局域网内socket 通讯
const val EVENT_KEY_INFO_SOCKET = "analytics_event_och_track_screen_msg"
// 局域网内socket 连接状态流转
const val EVENT_KEY_INFO_SOCKET_CONNECT = "analytics_event_och_track_screen_connect"
@@ -51,19 +57,23 @@ object OchChainLogManager {
const val EVENT_KEY_INFO_DB = "analytics_event_och_db"
fun writeChainLogDb( title: String, info: String) {
fun writeChainLogDb(title: String, info: String) {
writeChainLog(title, info, true, EVENT_KEY_INFO_DB)
}
fun writeChainLogNet(mustUpdate: Boolean, title: String, info: String) {
if(mustUpdate){
if (mustUpdate) {
writeChainLog(title, info, true, EVENT_KEY_INFO_Net)
}else {
} else {
writeChainLog(title, info, DebugConfig.isDebug(), EVENT_KEY_INFO_Net)
}
}
fun writechainLogDownload(title: String, info: String,upload: Boolean=true) {
writeChainLog(title, info, upload, EVENT_KEY_INFO_Download)
}
fun writeChainLogScanner(title: String, changeInfo: String) {
writeChainLog(title, changeInfo, true, EVENT_KEY_INFO_SCANNER)
}

View File

@@ -3,6 +3,7 @@ package com.mogo.och.common.module.wigets.media
data class MediaDataList(val medias: MutableList<MediaItem>)
data class MediaItem(
var priority:Int,
var fileUrl: String,
var fileType: Int,
var coverImageUrl: String,
@@ -11,6 +12,14 @@ data class MediaItem(
companion object {
const val MEDIA_TYPE_IMAGE = 1
const val MEDIA_TYPE_VIDEO = 2
const val PriorityConfi = 2
const val PriorityAd = 1
const val PrioritySite = 0
// 站点优先级 0
// 广告优先级 1
// 本地配置是 2
}
fun isImageType(): Boolean {
@@ -20,4 +29,6 @@ data class MediaItem(
fun isVideoType(): Boolean {
return this.fileType == MEDIA_TYPE_VIDEO
}
}

View File

@@ -17,6 +17,7 @@ import com.mogo.och.common.module.constant.OchCommonConst
import com.mogo.och.common.module.network.OchCommonServiceCallback
import com.mogo.och.common.module.network.OchCommonSubscribeImpl
import com.mogo.och.common.module.network.interceptor.transformTry
import com.mogo.och.common.module.utils.ProjectUtils
import com.mogo.och.common.module.wigets.media.MediaItem.Companion.MEDIA_TYPE_IMAGE
import com.mogo.och.common.module.wigets.media.MediaItem.Companion.MEDIA_TYPE_VIDEO
import io.reactivex.Observable
@@ -73,9 +74,8 @@ object MediaDataSourceManager {
if (!mMediaDataSourceListenerMap.containsKey(tag)) {
mMediaDataSourceListenerMap[tag] = dataSourceListener
}
val isSassProject = isSassProject()
MediaPlayLogger.printInfoLog("init, 初始化环境 isSassProject=$isSassProject")
if (isSassProject) {
MediaPlayLogger.printInfoLog("init, 初始化环境 isSassProject=${ProjectUtils.isSaas()}")
if (ProjectUtils.isSaas()) {
mNetworkService = MoGoRetrofitFactory.getInstance(OchCommonConst.getEagleMisUrl()).create(IMediaNetworkApi::class.java)
MediaPlayLogger.printInfoLog("init, 开始检查后台配置数据")
startGetMediaDataSourceLoop()
@@ -265,6 +265,7 @@ data class MediaDataResp(val data: List<MediaData>) : BaseData() {
val rotationItemList = mutableListOf<MediaItem>()
mediaDataList?.forEach {
val rotationItem = MediaItem(
priority = MediaItem.PriorityAd,
fileUrl = if (TextUtils.isEmpty(it.file_path)) "" else "${it.file_path}",
fileType = if (it.file_type == 1) MEDIA_TYPE_VIDEO else MEDIA_TYPE_IMAGE,
coverImageUrl = if (TextUtils.isEmpty(it.cover_path)) "" else "${it.cover_path}",

View File

@@ -7,6 +7,7 @@ import android.util.Log
import com.mogo.eagle.core.utilcode.download.DownloadUtils
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
import com.mogo.eagle.core.utilcode.util.EncryptUtils
import com.mogo.och.common.module.manager.download.DownloadManager
import com.mogo.och.common.module.utils.FileUtils
import java.io.File
@@ -58,7 +59,7 @@ object MediaFileCacheManager {
* 获取文件缓存的缓存path, 文件名以base64编码避免 中文命名,重复文件名的影响
*/
fun getCacheFileFullPathByUrl(context: Context, mediaUrl: String): String {
return getFileCacheDir(context) + getCacheFileName(mediaUrl)
return getFileCacheDir(context) +File.separator +getCacheFileName(mediaUrl)
}
/**
@@ -67,22 +68,14 @@ object MediaFileCacheManager {
fun isLocalCacheFileExists(context: Context, mediaUrl: String): Boolean {
val localVideoCacheFilePath =
getCacheFileFullPathByUrl(context, mediaUrl)
Log.e(TAG, "文件是否存在mediaUrl=$mediaUrl------本地文件:${localVideoCacheFilePath}")
return com.mogo.eagle.core.utilcode.util.FileUtils.isFileExists(localVideoCacheFilePath)
}
/**
* 下载文件
*/
fun downloadFile(context: Context, mediaUrl: String, listener: IDownloadListener) {
val downloadUrl = mediaUrl
val downloadDir = getFileCacheDir(context)
val downloadFileName = getCacheFileName(mediaUrl)
DownloadUtils.downLoad(
context,
downloadUrl,
downloadDir,
downloadFileName,
listener
)
fun downloadFile(mediaUrl: String, listener: IDownloadListener) {
DownloadManager.downloadVideoFile(mediaUrl,listener)
}
}

View File

@@ -47,6 +47,10 @@ class MediaLoopPlayView @JvmOverloads constructor(
pagerAdapter?.setNewMediaData(list)
}
fun setsetHightPriorityMediaItem(list: MutableList<MediaItem>){
pagerAdapter?.setSiteInfortion(list)
}
fun setPause() {
pagerAdapter?.setPause()
}
@@ -81,6 +85,8 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
//新的数据,在轮播下一次切换的时机完成整体数据的更新
private val mNewDataList: MutableList<MediaItem> = mutableListOf()
private var hightPriorityMediaItem: MutableList<MediaItem> = mutableListOf()
private var mLastViewPagerPosition = -1
private var mImageCountDownTimer: CountDownTimer? = null
@@ -111,6 +117,14 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
mNewDataList.addAll(list)
}
fun setSiteInfortion(list: MutableList<MediaItem>){
hightPriorityMediaItem = list
if(list.isEmpty()){
return
}
startPlayHightPriorityMediaItem(false)
}
override fun getCount(): Int {
return mDataList.size
}
@@ -144,7 +158,7 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
mItemViewList.add(imageView)
} else if (item.isVideoType()) {
val videoView = AdvanceVideoView(mContext)
videoView.initVideoUrlData(item.fileUrl, item.coverImageUrl)
videoView.initVideoUrlData(item.fileUrl, item.coverImageUrl,item.priority)
mItemViewList.add(videoView)
} else {
MediaPlayLogger.printErrorLog( "addItemView 不支持的文件类型:${item.fileType}")
@@ -174,6 +188,96 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
}
}
private fun startPlayHightPriorityMediaItem(isOnVideoError:Boolean){
val currentPosition = mViewPager.currentItem
if(mItemViewList.isEmpty()){
return
}
if(hightPriorityMediaItem.size<1){
val currentMediaItem = mDataList[currentPosition]
// 恢复数据 重新播放
when (val itemView = mItemViewList[currentPosition]) {
is AdvanceVideoView -> {
itemView.onVideoReset()
if (isOnVideoError) {
// 删除上一个缓存的视频
itemView.clearLocalErrorVideo()
}
itemView.initVideoUrlData(currentMediaItem.fileUrl,currentMediaItem.coverImageUrl,currentMediaItem.priority)
itemView.setThumbImageViewVisible()
itemView.startPlayVideo(hightPriorityVideoPlayLifecycleCallBack)
}
}
// 播放完高优视频
startLoopPlay()
return
}
val currentMediaItem = hightPriorityMediaItem.first()
when (val itemView = mItemViewList[currentPosition]) {
// 当前正在播放视频
is AdvanceVideoView -> {
MediaPlayLogger.printInfoLog("startPlayHightPriorityMediaItem: AdvanceVideoView, url=${currentMediaItem.fileUrl}")
itemView.onVideoReset()
if (isOnVideoError) {
// 删除上一个缓存的视频
itemView.clearLocalErrorVideo()
}
itemView.initVideoUrlData(currentMediaItem.fileUrl,currentMediaItem.coverImageUrl,currentMediaItem.priority)
itemView.setThumbImageViewVisible()
itemView.startPlayVideo(hightPriorityVideoPlayLifecycleCallBack)
hightPriorityMediaItem.removeFirst()
}
// 当前正在播放图片
is AdvanceImageView -> {
// 正在播放图片
MediaPlayLogger.printInfoLog("startPlayHightPriorityMediaItem: AdvanceImageView, url=${currentMediaItem.fileUrl}")
// 停止倒计时
cancelImageCountDownTimer()
// 寻找 视频Item
mDataList.forEachIndexed { index, mediaItem ->
// 广告中有视频播放器
if(mediaItem.fileType==MediaItem.MEDIA_TYPE_VIDEO){
if (currentPosition == mItemViewList.size - 1) {
//已经到最后一个, 从头开始
mViewPager.post {
mViewPager.setCurrentItem(0, true)
}
} else {
mViewPager.post {
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
}
}
return
}
}
// 当前播放列表中没有视频
// TODO: 创建临时view去播放视频
}
else -> {
MediaPlayLogger.printErrorLog("startLoopPlay 不支持的文件类型:${currentMediaItem.fileType}, url=${currentMediaItem.fileUrl}")
}
}
}
private var hightPriorityVideoPlayLifecycleCallBack = object : GSYSampleCallBack() {
override fun onPrepared(url: String?, vararg objects: Any?) {
CallerLogger.d(MediaLoopPlayView.TAG, "onPrepared")
}
override fun onAutoComplete(url: String?, vararg objects: Any?) {
CallerLogger.d(MediaLoopPlayView.TAG, "onAutoComplete")
startPlayHightPriorityMediaItem(false)
}
override fun onPlayError(url: String?, vararg objects: Any?) {
super.onPlayError(url, *objects)
CallerLogger.d(MediaLoopPlayView.TAG, "onPlayError, error=${objects}")
startPlayHightPriorityMediaItem(true)
}
}
private var videoPlayLifecycleCallBack = object : GSYSampleCallBack() {
override fun onPrepared(url: String?, vararg objects: Any?) {
@@ -303,7 +407,11 @@ class AdvancePagerAdapter(context: Context, viewPager: ViewPager) : PagerAdapter
"onPageScrollStateChanged, state = $state, currentItem = $currentPosition, lastPosition = $mLastViewPagerPosition"
)
if (mItemViewList.size > 1) { //多于1才会循环跳转
startLoopPlay()
if(hightPriorityMediaItem.size>0){
startPlayHightPriorityMediaItem(false)
}else {
startLoopPlay()
}
mLastViewPagerPosition = currentPosition
}
}

View File

@@ -15,6 +15,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.widget.media.video.TextureVideoViewOutlineProvider
import com.mogo.och.common.module.R
import com.mogo.och.common.module.wigets.media.MediaFileCacheManager
import com.mogo.och.common.module.wigets.media.MediaItem
import com.mogo.och.common.module.wigets.media.MediaLoopPlayView
import com.mogo.och.common.module.wigets.media.MediaPlayLogger
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
@@ -37,6 +38,7 @@ class AdvanceVideoView @JvmOverloads constructor(
private var thumbnailImageUrl: String = ""
private var videoUrl: String = ""
private var priority:Int = MediaItem.PrioritySite
private val downListener = object : IDownloadListener {
override fun onStart(url: String) {
@@ -61,7 +63,9 @@ class AdvanceVideoView @JvmOverloads constructor(
if (url == videoUrl) {
//下载完成
ThreadUtils.runOnUiThread {
startPlay(Uri.fromFile(File(path)).toString())
if(priority!=MediaItem.PrioritySite) {
startPlay(Uri.fromFile(File(path)).toString())
}
}
MediaPlayLogger.printInfoLog("download finished, 开始播放downloadUrl=${videoUrl}")
} else {//如果当前文件不存在再次去下载当前的
@@ -72,7 +76,9 @@ class AdvanceVideoView @JvmOverloads constructor(
if (FileUtils.isFileExists(path)) {
Logger.d(MediaLoopPlayView.TAG, "video play download, had download, startPlay")
ThreadUtils.runOnUiThread {
startPlay(Uri.fromFile(File(path)).toString())
if(priority!=MediaItem.PrioritySite) {
startPlay(Uri.fromFile(File(path)).toString())
}
}
MediaPlayLogger.printInfoLog("download finished, 开始播放downloadUrl=${videoUrl}")
} else {
@@ -119,11 +125,12 @@ class AdvanceVideoView @JvmOverloads constructor(
/**
* 初始化数据
*/
fun initVideoUrlData(videoUrl: String, thumbnailImageUrl: String) {
fun initVideoUrlData(videoUrl: String, thumbnailImageUrl: String,priority:Int) {
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v
// https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4
this.videoUrl = videoUrl
this.thumbnailImageUrl = thumbnailImageUrl
this.priority = priority
}
/**
@@ -132,6 +139,19 @@ class AdvanceVideoView @JvmOverloads constructor(
fun startPlayVideo(onCompletionListener: GSYSampleCallBack) {
//首先根据url检查video是否有已经下载完的本地视频文件
gsyVideoPlayerLifecycleCallback = onCompletionListener
videoPlayerView?.thumbImageView = thumbnailImageView
thumbnailImageView?.setImageResource(R.drawable.video_holder)
thumbnailImageView?.also {
Glide.with(context).asBitmap().load(thumbnailImageUrl)
.apply(
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
.placeholder(R.drawable.video_holder)
.error(R.drawable.video_holder)
.fallback(R.drawable.video_holder)
.centerCrop()
)
.into(it)
}
if (MediaFileCacheManager.isLocalCacheFileExists(context, this.videoUrl)) {
val localVideoCacheFilePath = MediaFileCacheManager.getCacheFileFullPathByUrl(
context, this.videoUrl
@@ -144,19 +164,6 @@ class AdvanceVideoView @JvmOverloads constructor(
MediaLoopPlayView.TAG, "播放视频videoUri=$realUri"
)
} else {
thumbnailImageView?.setImageResource(R.drawable.video_holder)
videoPlayerView?.thumbImageView = thumbnailImageView
thumbnailImageView?.also {
Glide.with(context).asBitmap().load(thumbnailImageUrl)
.apply(
RequestOptions().useUnlimitedSourceGeneratorsPool(true)
.placeholder(R.drawable.video_holder)
.error(R.drawable.video_holder)
.fallback(R.drawable.video_holder)
.centerCrop()
)
.into(it)
}
setThumbImageViewVisible()
startDownLoadVideoFile()
@@ -179,11 +186,7 @@ class AdvanceVideoView @JvmOverloads constructor(
private fun startDownLoadVideoFile() {
//下载视频,下载成功后再播放
MediaPlayLogger.printInfoLog( "startDownLoadVideoFile, downloadUrl=${this.videoUrl}")
MediaFileCacheManager.downloadFile(
context,
videoUrl,
downListener
)
MediaFileCacheManager.downloadFile(videoUrl, downListener)
}
fun clearLocalErrorVideo() {

View File

@@ -3,11 +3,18 @@ package com.mogo.och.common.module.wigets.media
import com.mogo.commons.mvp.MvpFragment
import com.mogo.commons.mvp.Presenter
import com.mogo.eagle.core.function.main.MainMoGoApplication
import com.mogo.eagle.core.utilcode.download.callback.IDownloadListener
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.download.DownloadManager
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import com.shuyu.gsyvideoplayer.GSYVideoManager
import kotlinx.android.synthetic.main.fragment_video_player.acb_add_site_video
import kotlinx.android.synthetic.main.fragment_video_player.imageVideoRotationView
/**
@@ -36,6 +43,12 @@ class MediaPlayerFragment :
}
override fun initViews() {
acb_add_site_video.onClick {
val siteList = mutableListOf<MediaItem>()
siteList.add(MediaItem(MediaItem.PrioritySite,"https://img.zhidaozhixing.com/fileServer/defaultPath/b47f361c3de6ea490f3086407fc0376f/a1%E8%B7%AF%E7%BA%BF%281%29.mp4",MediaItem.MEDIA_TYPE_VIDEO,"","title"))
siteList.add(MediaItem(MediaItem.PrioritySite,"https://img.zhidaozhixing.com/fileServer/defaultPath/a6376a452df030ee97770688f6fea4c0/a2%E8%B7%AF%E7%BA%BF.mp4",MediaItem.MEDIA_TYPE_VIDEO,"","title"))
setHightPriorityMediaItem(siteList)
}
MediaFileCacheManager.createFileCacheDir(MainMoGoApplication.getApp().applicationContext)
MediaDataSourceManager.init(TAG, object : IMediaDataSourceListener {
override fun onMediaDataSourceChanged(list: List<MediaItem>) {
@@ -56,6 +69,20 @@ class MediaPlayerFragment :
})
}
fun setHightPriorityMediaItem(list: MutableList<MediaItem>){
context?.let {context->
val cacheList = list.filter {
DownloadManager.downloadVideoFile(it.fileUrl,null)
MediaFileCacheManager.isLocalCacheFileExists(context,it.fileUrl)
}
ThreadUtils.runOnUiThread {
imageVideoRotationView.setsetHightPriorityMediaItem(cacheList.toMutableList())
}
}
}
override fun onPause() {
super.onPause()
imageVideoRotationView.setPause()

View File

@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- 图片或视频广告-->
<com.mogo.och.common.module.wigets.media.MediaLoopPlayView
android:id="@+id/imageVideoRotationView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/acb_add_site_video"
android:text="添加视频"
android:gravity="center"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_30"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -6,60 +6,70 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "2"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"priority": 2,
"title": "3"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "4"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "5"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "6"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "7"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "8"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "9"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"priority": 2,
"title": "10"
}
]
@@ -70,12 +80,14 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "2"
}
]
@@ -86,24 +98,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -114,24 +130,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -150,24 +170,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "2"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"priority": 2,
"title": "3"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "4"
},
{
@@ -180,36 +204,42 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "5"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "6"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "7"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "8"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "9"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"priority": 2,
"title": "10"
}
]
@@ -220,12 +250,14 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "2"
}
]
@@ -236,24 +268,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -264,24 +300,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -294,12 +334,14 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
"priority": 2,
"title": "2"
}
]
@@ -310,12 +352,14 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "2"
}
]
@@ -326,24 +370,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -354,24 +402,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -384,10 +436,12 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357256102/1.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"priority": 2,
"fileType": 1,
"coverImageUrl": "",
"title": "2"
@@ -396,48 +450,56 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357557335/3.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357382357/2.png",
"priority": 2,
"title": "3"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "4"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357834634/5.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "5"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676358660379/6.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676357598483/4.jpg",
"priority": 2,
"title": "6"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360154589/7.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "7"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360185500/8.jpg",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "8"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"fileType": 1,
"coverImageUrl": "",
"priority": 2,
"title": "9"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360274126/10.mp4",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1676360224773/9.png",
"priority": 2,
"title": "10"
}
]
@@ -448,12 +510,14 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "1"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
"fileType": 2,
"coverImageUrl": "",
"priority": 2,
"title": "2"
}
]
@@ -464,24 +528,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]
@@ -492,24 +560,28 @@
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969536177/大运会.png",
"priority": 2,
"title": "蘑菇车联牵手成都大运会"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708596763/全车型混剪增加红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969511280/车队.png",
"priority": 2,
"title": "蘑菇车联覆盖生活的方方面面"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708554279/红旗车队.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969553174/红旗重新排版.png",
"priority": 2,
"title": "蘑菇车联之红旗车队"
},
{
"fileUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655708409810/20210610重新排版3屏.m4v",
"fileType": 2,
"coverImageUrl": "https://img.zhidaozhixing.com/fileServer/online_car_hailing/1655969579713/三屏.png",
"priority": 2,
"title": "多视角体验蘑菇车联自动驾驶"
}
]