[6.8.0][驾驶位视频流] 写死域名;添加定时轮询请求
This commit is contained in:
@@ -135,11 +135,16 @@ class DriveSeatVideoProviderImpl: IDriveSeatVideoProvider {
|
||||
private fun start() {
|
||||
timer?.cancel()
|
||||
scope.launch {
|
||||
val result = requestVideoInfo()
|
||||
if (result != null) {
|
||||
data = result
|
||||
Log.d(TAG, "开启定时轮询请求...")
|
||||
while (true) {
|
||||
Log.d(TAG, "当次请求开始...")
|
||||
val result = requestVideoInfo()
|
||||
if (result != null) {
|
||||
data = result
|
||||
}
|
||||
Log.d(TAG, "当次请求结束...")
|
||||
delay(5000)
|
||||
}
|
||||
delay(5000)
|
||||
}.also {
|
||||
timer = it
|
||||
}
|
||||
@@ -150,6 +155,6 @@ class DriveSeatVideoProviderImpl: IDriveSeatVideoProvider {
|
||||
}
|
||||
|
||||
private fun getApi(): IVideoLiveUrlApi? {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(HostConst.getHost()).create(IVideoLiveUrlApi::class.java)
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(HostConst.HOST_RELEASE).create(IVideoLiveUrlApi::class.java)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user