diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt index 5f09fdcb8c..bb612f1cc8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/DriverMonitorView.kt @@ -39,13 +39,6 @@ class DriverMonitorView : // private var currentDriverLiveSN = "F803EB2046PZD00164" private var currentDriverLiveSN = "" - private val liveStreamManager by lazy { - LiveStreamManagerImpl.getInstance( - context.applicationContext as Application?, - MoGoAiCloudClientConfig.getInstance().sn, - false - ) - } var liveListener: LiveListener? = null @@ -75,6 +68,7 @@ class DriverMonitorView : // http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=111386656 // 测试数据 sopShowDriverMap["F803EB2046PZD00164"] = "F803EB2046PZD00164"//凤坤工位旁的分体机 + sopShowDriverMap["X20202105189C2522114198E7B3"] = "F803EB2046PZD00164"//凤坤工位旁的分体机 sopShowDriverMap["X202022060289M7N8P"] = "F803EB2046PZD00188"//湘A01733D // key=pad司机屏幕SN,value=分体机SN,value用来调用ZeGo直播服务查看直播,@see MoGoAiCloudTrafficLive.viewDesignativeVehicleLive sopShowDriverMap["20220524733SWT1"] = "F803EB2046PZD00190"//湘D01777D @@ -109,6 +103,13 @@ class DriverMonitorView : stopLive() } currentDriverLiveSN = it + + // 这里知只是了初始化下直播SDK,防止直接调用观看直播时候还未登录问题 + LiveStreamManagerImpl.getInstance( + context.applicationContext as Application?, + MoGoAiCloudClientConfig.getInstance().sn, + false + ) } ?: let { // 如果没查到,设置当前车辆为null,并将之前的直播关闭 stopLive() @@ -132,7 +133,6 @@ class DriverMonitorView : */ fun startLive() { if (currentDriverLiveSN.isNotEmpty()) { - liveStreamManager.setLivePushStatusChangeCallback { } Logger.d( "${SceneConstant.M_HMI}$TAG", "检查司机直播……isLived=$isLived 当前车上的司机端SN=${currentDriverSN},直播分体机SN=${currentDriverLiveSN}" @@ -225,7 +225,7 @@ class DriverMonitorView : override fun onPlaRequesting() { Logger.w("${SceneConstant.M_HMI}$TAG", "onPlaRequesting……") CallerLogger.w("${SceneConstant.M_HMI}$TAG", "onPlaRequesting……") - isLived = true + isLived = false refreshView(isLived) } }