-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Media player enhancement
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package controllers.media; | ||
|
||
import controllers.io.cache.CacheService; | ||
import models.songs.Song; | ||
|
||
/** | ||
* <pre> | ||
* Created by Esteban Luchsinger on 24.04.2016. | ||
* This <code>MediaPlayer</code> uses a cache as a source for the Media. | ||
* </pre> | ||
*/ | ||
public class CachedMediaPlayer { | ||
|
||
private final CacheService cacheService; | ||
|
||
public CachedMediaPlayer(CacheService cacheService) { | ||
this.cacheService = cacheService; | ||
} | ||
|
||
/** | ||
* Plays a song. | ||
* If this song is already cached, it plays it from the cache. | ||
* If the song is not yet cached, it will cache it first. | ||
* @param song | ||
*/ | ||
public void play(Song song) { | ||
|
||
} | ||
|
||
/** | ||
* Pauses the current MediaPlayer from playing a song. | ||
*/ | ||
public void pause() { | ||
|
||
} | ||
|
||
public void stop() { | ||
|
||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package controllers.networking.streaming.music.callback; | ||
|
||
/** | ||
* <pre> | ||
* Created by Esteban on 22.04.2016. | ||
* Tells that the song should be paused. | ||
* </pre> | ||
*/ | ||
@FunctionalInterface | ||
public interface OnPause { | ||
void pause(); | ||
} |