mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +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()
|
if (!isLive) seekToWatchPosition()
|
||||||
exoPlayer.prepare()
|
exoPlayer.prepare()
|
||||||
exoPlayer.play()
|
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()
|
initializePlayerNotification()
|
||||||
if (sponsorBlockEnabled) fetchSponsorBlockSegments()
|
if (sponsorBlockEnabled) fetchSponsorBlockSegments()
|
||||||
// show comments if related streams disabled
|
// show comments if related streams disabled
|
||||||
if (!relatedStreamsEnabled) toggleComments()
|
if (!relatedStreamsEnabled) toggleComments()
|
||||||
// prepare for autoplay
|
// prepare for autoplay
|
||||||
if (autoplayEnabled) setNextStream()
|
if (autoplayEnabled) setNextStream()
|
||||||
|
|
||||||
|
// add the video to the watch history
|
||||||
if (watchHistoryEnabled) DatabaseHelper.addToWatchHistory(videoId!!, streams)
|
if (watchHistoryEnabled) DatabaseHelper.addToWatchHistory(videoId!!, streams)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user