Android: Glue code for pausing audio playback
This commit is contained in:
parent
c9738a3a65
commit
18801779df
1 changed files with 10 additions and 0 deletions
|
@ -40,6 +40,16 @@ MediaPlayer {
|
||||||
property int lastDuration: 0
|
property int lastDuration: 0
|
||||||
property int playedFrom: 0
|
property int playedFrom: 0
|
||||||
|
|
||||||
|
property var androidConnections: Connections {
|
||||||
|
target: (typeof(gpodderAndroid) === 'undefined') ? null : gpodderAndroid
|
||||||
|
|
||||||
|
onAudioBecomingNoisy: {
|
||||||
|
if (playbackState === MediaPlayer.PlayingState) {
|
||||||
|
pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function togglePause() {
|
function togglePause() {
|
||||||
if (playbackState === MediaPlayer.PlayingState) {
|
if (playbackState === MediaPlayer.PlayingState) {
|
||||||
pause();
|
pause();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue