diff --git a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerManager.kt b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerManager.kt index ba2e1f4..fd4350d 100755 --- a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerManager.kt +++ b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerManager.kt @@ -221,10 +221,10 @@ private constructor(private val serviceConnection: JcServiceConnection) : JcPlay playlist[currentPositionList.inc()] } catch (e: IndexOutOfBoundsException) { if (repeatPlaylist) { - playlist.first() + return playlist.first() } - return null + null } } } @@ -237,7 +237,7 @@ private constructor(private val serviceConnection: JcServiceConnection) : JcPlay playlist[currentPositionList.dec()] } catch (e: IndexOutOfBoundsException) { - playlist.first() + return playlist.first() } } }