將stopRetryCount函數加上removeCallbacks,停止重連功能
This commit is contained in:
parent
2f4e3659f9
commit
df105dd518
@ -117,6 +117,7 @@ class VideoView : ConstraintLayout, SurfaceHolder.Callback, GstCallback {
|
|||||||
|
|
||||||
fun stopRetryCount() {
|
fun stopRetryCount() {
|
||||||
retryCount = RETRY_OFF
|
retryCount = RETRY_OFF
|
||||||
|
mHandler.removeCallbacks(retryRunnable)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun surfaceCreated(holder: SurfaceHolder) {
|
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||||
@ -178,7 +179,7 @@ class VideoView : ConstraintLayout, SurfaceHolder.Callback, GstCallback {
|
|||||||
retryCount++
|
retryCount++
|
||||||
} else {
|
} else {
|
||||||
stopRetryCount()
|
stopRetryCount()
|
||||||
//Log.e("${TAG}_$tag", "Retry count = 5, stopped retry...")
|
Log.e("${TAG}_$tag", "Retry count = 5, stopped retry...")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user