[6.8.0][驾驶位视频流] 代码提交
This commit is contained in:
@@ -23,6 +23,7 @@ import com.mogo.eagle.core.function.api.devatools.mofang.*
|
||||
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider
|
||||
import com.mogo.eagle.core.function.api.lookaround.*
|
||||
import com.mogo.eagle.core.function.api.upgrade.*
|
||||
import com.mogo.eagle.core.function.api.driver.video.IDriveSeatVideoProvider
|
||||
|
||||
/**
|
||||
* 开发套件工具接口
|
||||
@@ -367,4 +368,9 @@ interface IDevaToolsProvider : IProvider {
|
||||
* 接管
|
||||
*/
|
||||
fun takeOver(@TakeOverAnnotation takeOverAnnotation: Int)
|
||||
|
||||
/**
|
||||
* 驾驶位视频流相关业务逻辑提供者
|
||||
*/
|
||||
fun driveSeatVideoProvider(): IDriveSeatVideoProvider
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.mogo.eagle.core.function.api.driver.video
|
||||
|
||||
import android.view.View
|
||||
import com.zhjt.mogo_core_function_devatools.driver.video.vo.VideoUrlData
|
||||
|
||||
interface IDriveSeatVideoProvider {
|
||||
|
||||
/**
|
||||
* 视频直播是否可用
|
||||
* @return true: 可用; false: 不可用
|
||||
*/
|
||||
suspend fun requestVideoInfo(): VideoUrlData?
|
||||
|
||||
/**
|
||||
* 获取司机位视频展示控件
|
||||
*/
|
||||
fun getDriveVideoView(playUrl: String, playCallback: ((Event) -> Unit)? = null): View?
|
||||
|
||||
|
||||
/**
|
||||
* 获取最新的视频数据
|
||||
*/
|
||||
fun getLastData(): VideoUrlData?
|
||||
|
||||
|
||||
sealed class Event {
|
||||
|
||||
object Loading: Event()
|
||||
|
||||
object Playing: Event()
|
||||
|
||||
data class Failed(val msg: String): Event()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.zhjt.mogo_core_function_devatools.driver.video.vo
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
|
||||
@Keep data class VideoUrlData(var cameraType: Int? = null, var livePlayUrl: String? = null)
|
||||
Reference in New Issue
Block a user