Android: Glue code for pausing audio playback

This commit is contained in:
Thomas Perl 2014-11-22 12:26:21 +01:00
parent c9738a3a65
commit 18801779df

View file

@ -40,6 +40,16 @@ MediaPlayer {
property int lastDuration: 0
property int playedFrom: 0
property var androidConnections: Connections {
target: (typeof(gpodderAndroid) === 'undefined') ? null : gpodderAndroid
onAudioBecomingNoisy: {
if (playbackState === MediaPlayer.PlayingState) {
pause();
}
}
}
function togglePause() {
if (playbackState === MediaPlayer.PlayingState) {
pause();