mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
fix crash on low android versions
This commit is contained in:
parent
7fea27b299
commit
15105b0227
@ -880,14 +880,20 @@ class PlayerFragment : BaseFragment() {
|
||||
if (!isLive) seekToWatchPosition()
|
||||
exoPlayer.prepare()
|
||||
exoPlayer.play()
|
||||
// show controllers when not in picture in picture mode
|
||||
if (!activity?.isInPictureInPictureMode!!) exoPlayerView.useController = true
|
||||
|
||||
if (SDK_INT >= Build.VERSION_CODES.O) {
|
||||
// show controllers when not in picture in picture mode
|
||||
if (!activity?.isInPictureInPictureMode!!) exoPlayerView.useController = true
|
||||
}
|
||||
// show the player notification
|
||||
initializePlayerNotification()
|
||||
if (sponsorBlockEnabled) fetchSponsorBlockSegments()
|
||||
// show comments if related streams disabled
|
||||
if (!relatedStreamsEnabled) toggleComments()
|
||||
// prepare for autoplay
|
||||
if (autoplayEnabled) setNextStream()
|
||||
|
||||
// add the video to the watch history
|
||||
if (watchHistoryEnabled) DatabaseHelper.addToWatchHistory(videoId!!, streams)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user