|
@@ -10,11 +10,11 @@ class MusicPlayer {
|
|
musicPaths.add(path)
|
|
musicPaths.add(path)
|
|
}
|
|
}
|
|
|
|
|
|
- fun remove(path: String){
|
|
|
|
|
|
+ fun remove(path: String) {
|
|
musicPaths.remove(path)
|
|
musicPaths.remove(path)
|
|
}
|
|
}
|
|
|
|
|
|
- fun clear(){
|
|
|
|
|
|
+ fun clear() {
|
|
musicPaths.clear()
|
|
musicPaths.clear()
|
|
}
|
|
}
|
|
|
|
|
|
@@ -46,7 +46,7 @@ class MusicPlayer {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- fun start(){
|
|
|
|
|
|
+ fun start() {
|
|
for (mediaPlayer in mediaPlayers) {
|
|
for (mediaPlayer in mediaPlayers) {
|
|
mediaPlayer.apply {
|
|
mediaPlayer.apply {
|
|
start()
|
|
start()
|
|
@@ -54,14 +54,14 @@ class MusicPlayer {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- fun pause(){
|
|
|
|
- for(mediaPlayer in mediaPlayers){
|
|
|
|
|
|
+ fun pause() {
|
|
|
|
+ for (mediaPlayer in mediaPlayers) {
|
|
mediaPlayer.pause()
|
|
mediaPlayer.pause()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- fun seekTo(mSec:Int){
|
|
|
|
- for(mediaPlayer in mediaPlayers){
|
|
|
|
|
|
+ fun seekTo(mSec: Int) {
|
|
|
|
+ for (mediaPlayer in mediaPlayers) {
|
|
mediaPlayer.seekTo(mSec)
|
|
mediaPlayer.seekTo(mSec)
|
|
}
|
|
}
|
|
}
|
|
}
|