Skip to content

Commit 0133786

Browse files
committed
Publish V0.0.2
1 parent 887751c commit 0133786

21 files changed

Lines changed: 243 additions & 7 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ repositories {
2626
mavenCentral()
2727
}
2828
dependencies{
29-
implementation("io.github.selemba1000:JavaMediaTranportControls:0.0.1")
29+
implementation("io.github.selemba1000:JavaMediaTranportControls:0.0.2")
3030
}
3131
```
32-
Current version is 0.0.1.
32+
Current version is 0.0.2.
3333
#### Maven Local
3434
Download this repository via git with:
3535
```bash

src/main/java/io/github/selemba1000/JMTC.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33
import io.github.selemba1000.linux.LinuxJMTC;
44
import io.github.selemba1000.windows.WindowsJMTC;
55

6+
/**
7+
* This singleton is the entrypoint to the library. Use getInstance to access the functions of the library
8+
*/
69
public abstract class JMTC {
710

11+
/**
12+
* Instance reference to implement singleton pattern
13+
*/
814
protected static JMTC INSTANCE;
915

16+
/**
17+
* Internal constructor to implement singleton pattern.
18+
*/
1019
protected JMTC() {
1120
}
1221

src/main/java/io/github/selemba1000/JMTCButtonCallback.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
/**
44
* Interface for callback function for Buttons.
5+
* Can be set as Lambda function.
56
*/
67
public interface JMTCButtonCallback {
8+
/**
9+
* Callback function.
10+
*/
711
void callback();
812
}

src/main/java/io/github/selemba1000/JMTCCallbacks.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
*/
66
@SuppressWarnings("CanBeFinal")
77
public class JMTCCallbacks {
8+
/**
9+
* Creates an empty instance to be filled by property access
10+
*/
11+
public JMTCCallbacks() {
12+
}
13+
814
/**
915
* Callback for when Play button is pressed in UI or as MediaKey.
1016
*/

src/main/java/io/github/selemba1000/JMTCMediaProperties.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
* Abstract class for media properties. Not in Use currently.
55
*/
66
public abstract class JMTCMediaProperties {
7+
/**
8+
* Create empty instance. Not used directly as class is abstract.
9+
*/
10+
public JMTCMediaProperties(){}
711
}

src/main/java/io/github/selemba1000/JMTCMediaType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
* Currently only Music is supported.
66
*/
77
public enum JMTCMediaType {
8+
/**
9+
* Currently the only supported media type
10+
*/
811
Music,
912
}

src/main/java/io/github/selemba1000/JMTCParameters.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,17 @@ public JMTCParameters(LoopStatus loopStatus, Double volume, Double rate, Boolean
5454
* Track = Loop current Track
5555
*/
5656
public enum LoopStatus {
57+
/**
58+
* Repeat nothing. Stop after last Song
59+
*/
5760
None,
61+
/**
62+
* Repeat the Playlist after the last song
63+
*/
5864
Playlist,
65+
/**
66+
* Repeat only the currently playing track
67+
*/
5968
Track
6069
}
6170
}

src/main/java/io/github/selemba1000/JMTCPlayingState.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,24 @@
1414
* Changing = the player is changing the file. Windows only
1515
*/
1616
public enum JMTCPlayingState {
17+
/**
18+
* Media is currently playing
19+
*/
1720
PLAYING,
21+
/**
22+
* Media is currently paused
23+
*/
1824
PAUSED,
25+
/**
26+
* Media is stopped. Usually when media was selected, but not started.
27+
*/
1928
STOPPED,
29+
/**
30+
* Currently no media loaded.
31+
*/
2032
CLOSED,
33+
/**
34+
* The Media is currently changing/loading.
35+
*/
2136
CHANGING,
22-
2337
}

src/main/java/io/github/selemba1000/JMTCSeekCallback.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
* Interface for seek lambda callback.
55
*/
66
public interface JMTCSeekCallback {
7+
/**
8+
* The callback function.
9+
* @param position The position that was seeked to in ms.
10+
*/
711
void callback(Long position);
812
}

src/main/java/io/github/selemba1000/JMTCValueChangedCallback.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
/**
44
* Interface for callback when value of property changes.
5+
* @param <T> the Type of value that changed
56
*/
67
public interface JMTCValueChangedCallback<T> {
78

9+
/**
10+
* Callback for when property changes
11+
* @param property the property that changed
12+
*/
813
void callback(T property);
914

1015
}

0 commit comments

Comments
 (0)