From 80995712d7fe500805b05fe3ded89f113a81ad21 Mon Sep 17 00:00:00 2001 From: Farhan Arshad Date: Tue, 14 Jan 2025 17:46:09 +0500 Subject: [PATCH] fix: issue to load the video through chrome-cast device fixes: LEARNER-10350 --- .../course/presentation/unit/video/EncodedVideoUnitViewModel.kt | 1 + .../course/presentation/unit/video/VideoUnitViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/course/src/main/java/org/openedx/course/presentation/unit/video/EncodedVideoUnitViewModel.kt b/course/src/main/java/org/openedx/course/presentation/unit/video/EncodedVideoUnitViewModel.kt index 4ef854592..ab3e3e60d 100644 --- a/course/src/main/java/org/openedx/course/presentation/unit/video/EncodedVideoUnitViewModel.kt +++ b/course/src/main/java/org/openedx/course/presentation/unit/video/EncodedVideoUnitViewModel.kt @@ -120,6 +120,7 @@ class EncodedVideoUnitViewModel( val executor = Executors.newSingleThreadExecutor() CastContext.getSharedInstance(context, executor).addOnSuccessListener { castContext -> castPlayer = CastPlayer(castContext) + _isUpdated.value = true }.addOnFailureListener { logger.e(it, true) } diff --git a/course/src/main/java/org/openedx/course/presentation/unit/video/VideoUnitViewModel.kt b/course/src/main/java/org/openedx/course/presentation/unit/video/VideoUnitViewModel.kt index f753c9cef..42dbf5be9 100644 --- a/course/src/main/java/org/openedx/course/presentation/unit/video/VideoUnitViewModel.kt +++ b/course/src/main/java/org/openedx/course/presentation/unit/video/VideoUnitViewModel.kt @@ -42,7 +42,7 @@ open class VideoUnitViewModel( val currentVideoTime: LiveData get() = _currentVideoTime - private val _isUpdated = MutableLiveData(true) + protected val _isUpdated = MutableLiveData(true) val isUpdated: LiveData get() = _isUpdated