-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added seekTo function, added Duration into MediaInfo object
- Loading branch information
Rafal
committed
Apr 26, 2018
1 parent
41cc4e0
commit 928f28e
Showing
15 changed files
with
103 additions
and
19 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
rxaudiomanager/src/main/java/github/com/coneey/rxaudiomanager/mediaListener/MediaInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package git.luolix.top.coneey.rxaudiomanager.mediaListener | ||
|
||
typealias Second = Int | ||
typealias Millisecond = Int | ||
typealias Percent = Int | ||
|
||
data class MediaInfo(val state: MediaState, val bufferProgress: Percent, val currentTime: Second) | ||
data class MediaInfo(val state: MediaState, val bufferProgress: Percent, | ||
val currentTimeMilis: Millisecond, | ||
val currentTime: Second, | ||
val duration: Second) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
...ager/src/main/java/github/com/coneey/rxaudiomanager/serviceMediaManager/ServiceCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package git.luolix.top.coneey.rxaudiomanager.serviceMediaManager | ||
|
||
import android.media.AudioAttributes | ||
import git.luolix.top.coneey.rxaudiomanager.mediaListener.Millisecond | ||
|
||
sealed class ServiceCommand { | ||
class Stop : ServiceCommand() | ||
class Pause : ServiceCommand() | ||
class Resume : ServiceCommand() | ||
class Finish : ServiceCommand() | ||
class SeekTo(millisecond: Millisecond) : ServiceCommand() | ||
class LoadStreamMusic(val url: String, val attr: AudioAttributes?) : ServiceCommand() | ||
class LoadResourceMusic(val resourceId: Int, val attr: AudioAttributes?) : ServiceCommand() | ||
class LoadFileMusic(val filePath: String, val attr: AudioAttributes?) : ServiceCommand() | ||
class LoadExternalFileMusic(val filePath: String, val attr: AudioAttributes?) : ServiceCommand() | ||
class LoadInternalFileMusic(val filePath: String, val attr: AudioAttributes?) : ServiceCommand() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters