Merge pull request #2 from gpodder/f/headset-disconnect
Android: Glue code for pausing audio playback
This commit is contained in:
commit
cadcd5ddcf
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue