Skip to content

Commit

Permalink
fix: Restrict screen display timed out while video is playing
Browse files Browse the repository at this point in the history
- Added flag to handle screen display timed out

fix: LEARNER-10249
  • Loading branch information
omerhabib26 committed Oct 21, 2024
1 parent a12323c commit 0468215
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class VideoFullScreenFragment : Fragment(R.layout.fragment_video_full_screen) {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.playerView.keepScreenOn = true
binding.root.setOnApplyWindowInsetsListener { _, insets ->
val insetsCompat = WindowInsetsCompat.toWindowInsetsCompat(insets)
.getInsets(WindowInsetsCompat.Type.systemBars())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class VideoUnitFragment : Fragment(R.layout.fragment_video_unit) {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

binding.playerView.keepScreenOn = true
binding.cvVideoTitle?.setContent {
OpenEdXTheme {
VideoTitle(text = requireArguments().getString(ARG_TITLE) ?: "")
Expand Down

0 comments on commit 0468215

Please sign in to comment.