mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
parent
787bc1bfec
commit
20584f33b2
@ -1195,7 +1195,7 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
|||||||
*/
|
*/
|
||||||
private fun getCurrentChapterIndex(): Int? {
|
private fun getCurrentChapterIndex(): Int? {
|
||||||
val currentPosition = exoPlayer.currentPosition / 1000
|
val currentPosition = exoPlayer.currentPosition / 1000
|
||||||
return chapters.indexOfFirst { currentPosition >= it.start!! }.takeIf { it >= 0 }
|
return chapters.indexOfLast { currentPosition >= it.start!! }.takeIf { it >= 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setMediaSource(uri: Uri, mimeType: String) {
|
private fun setMediaSource(uri: Uri, mimeType: String) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user