Add keyboard navigation for media playback

This commit is contained in:
Thomas Perl 2014-10-28 11:37:26 +01:00
parent 76d1d48bff
commit cb4aa06901
3 changed files with 48 additions and 1 deletions

View file

@ -40,6 +40,14 @@ MediaPlayer {
property int lastDuration: 0
property int playedFrom: 0
function togglePause() {
if (playbackState === MediaPlayer.PlayingState) {
pause();
} else if (playbackState === MediaPlayer.PausedState) {
play();
}
}
function playbackEpisode(episode_id) {
if (episode == episode_id) {
// If the episode is already loaded, just start playing