Skip to content

Commit

Permalink
Hide video preview on error
Browse files Browse the repository at this point in the history
  • Loading branch information
naveensingh committed Sep 27, 2024
1 parent fafd634 commit 43eff34
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
override fun onPlayerErrorChanged(error: PlaybackException?) {
binding.errorMessageHolder.errorMessage.apply {
if (error != null) {
binding.videoPreview.beGone()
binding.videoPlayOutline.beGone()
text = error.localizedMessage ?: getString(R.string.failed_to_load_media)
setTextColor(if (context.config.blackBackground) Color.WHITE else context.getProperTextColor())
Expand Down

0 comments on commit 43eff34

Please # to comment.