Skip to content

Commit f08c83e

Browse files
author
archurtan
committed
调整预览逻辑
Change-Id: I4e7010802edc36bbb2703b416026ad8d6c4ea918
1 parent cd89c97 commit f08c83e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/video/preview/VideoPreviewActivity.kt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,6 @@ open class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Su
163163
// var tmpCountDownLatch = CountDownLatch(1)
164164
// countDownLatchs.put("${App.data.accessInfo!!.productId}/${presenter.getDeviceName()}", tmpCountDownLatch)
165165
// tmpCountDownLatch.await()
166-
167-
XP2P.delegateHttpFlv("${App.data.accessInfo!!.productId}/${presenter.getDeviceName()}")?.let {
168-
urlPrefix = it
169-
if (!TextUtils.isEmpty(urlPrefix)) {
170-
player?.let {
171-
resetPlayer()
172-
keepPlayerplay("${App.data.accessInfo!!.productId}/${presenter.getDeviceName()}")
173-
}
174-
}
175-
}
176166
}).start()
177167
}
178168

@@ -535,6 +525,15 @@ open class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Su
535525
var content = getString(R.string.connected, id)
536526
Toast.makeText(this@VideoPreviewActivity, content, Toast.LENGTH_SHORT).show()
537527
}
528+
XP2P.delegateHttpFlv("${App.data.accessInfo!!.productId}/${presenter.getDeviceName()}")?.let {
529+
urlPrefix = it
530+
if (!TextUtils.isEmpty(urlPrefix)) {
531+
player?.let {
532+
resetPlayer()
533+
keepPlayerplay("${App.data.accessInfo!!.productId}/${presenter.getDeviceName()}")
534+
}
535+
}
536+
}
538537
}
539538
}
540539

0 commit comments

Comments
 (0)