「dev_opt_2.15.0」
1、功能范围:bus司机屏增加开关;bus乘客屏展示视频流; 交互&逻辑:在司机屏运营面板增加开关,用于控制是否展示视频位: 开关开启时,有视频流的车辆持续常驻展示视频流,无视频流的车辆不展示(无占位); 开关关闭时,无论是否有视频流,均不展示(无占位);开关默认关闭 开关开启后,有视频流的展示位置如图所示常驻展示:
This commit is contained in:
@@ -15,7 +15,10 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.*
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.ivNormal
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.liveProgressBar
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.textureViewDriverMonitor
|
||||
import kotlinx.android.synthetic.main.view_driver_monitor.view.tvLoadingHit
|
||||
|
||||
/**
|
||||
* 乘客端查看当前车辆驾驶舱的司机监控View
|
||||
@@ -56,6 +59,8 @@ class DriverMonitorView :
|
||||
)
|
||||
}
|
||||
|
||||
var liveListener: LiveListener? = null
|
||||
|
||||
constructor(context: Context?) : super(context) {
|
||||
initView(context)
|
||||
}
|
||||
@@ -124,6 +129,20 @@ class DriverMonitorView :
|
||||
textureViewDriverMonitor,
|
||||
carLiveCallBack
|
||||
)
|
||||
} ?: let {
|
||||
//为空又怎么撸
|
||||
if (CallerTelematicManager.getServerToken().isNotEmpty()) {
|
||||
Logger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${CallerTelematicManager.getServerToken()} 不支持直播"
|
||||
)
|
||||
CallerLogger.d(
|
||||
"${SceneConstant.M_HMI}$TAG",
|
||||
"检查司机直播……isLived=$isLived 当前车辆SN=${CallerTelematicManager.getServerToken()} 不支持直播"
|
||||
)
|
||||
// 乘客屏幕连接上了司机屏,但是司机屏不在直播范围内,进行隐藏操作。
|
||||
liveListener?.onPlayError()
|
||||
}
|
||||
}
|
||||
// TODO 测试用的
|
||||
// MoGoAiCloudTrafficLive.viewDesignativeVehicleLive(
|
||||
@@ -186,4 +205,8 @@ class DriverMonitorView :
|
||||
}
|
||||
}
|
||||
|
||||
interface LiveListener {
|
||||
fun onPlayError()
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user