Activity log for bug #1389477

Date Who What changed Old value New value Message
2014-11-05 02:42:20 Jamie Strandboge bug added bug
2014-11-05 03:00:47 Jamie Strandboge summary 'loops: Audio.Infinite' only plays once if phone suspends 'loops: Audio.Infinite' and 'loops: MediaPlayer.Infinite' only plays once if phone suspends
2014-11-05 03:03:13 Jamie Strandboge description I'm using the following: Audio { id: playAudio autoLoad: true autoPlay: true loops: Audio.Infinite source: "./file.mp3" } and the file plays fine and will continue playing if the phone suspends, however the file won't loop until the phone is unsuspended and the application brought to the foreground. I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will continue playing if the phone suspends, however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried: MediaPlayer { id: playAudio autoLoad: true autoPlay: true loops: MediaPlayer.Infinite source: "./file.mp3" } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes.
2014-11-05 03:29:13 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will continue playing if the phone suspends, however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried: MediaPlayer { id: playAudio autoLoad: true autoPlay: true loops: MediaPlayer.Infinite source: "./file.mp3" } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop perfectly. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this: MediaPlayer { id: playAudio autoLoad: true autoPlay: true loops: MediaPlayer.Infinite source: "./file.mp3" onStatusChanged: { console.log("status changed: " + status) if (status === MediaPlayer.EndOfMedia) { seek(0) play() } } } but it is noisy (audible gap and a click sound)
2014-11-05 03:33:38 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop perfectly. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this: MediaPlayer { id: playAudio autoLoad: true autoPlay: true loops: MediaPlayer.Infinite source: "./file.mp3" onStatusChanged: { console.log("status changed: " + status) if (status === MediaPlayer.EndOfMedia) { seek(0) play() } } } but it is noisy (audible gap and a click sound) I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     }
2014-11-05 03:33:56 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work.
2014-11-05 03:37:30 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. Looping is essential for the app I am writing (a white noise relaxation/sleep aid app).
2014-11-05 12:42:33 Jamie Strandboge summary 'loops: Audio.Infinite' and 'loops: MediaPlayer.Infinite' only plays once if phone suspends 'loops: Audio.Infinite' and 'loops: MediaPlayer.Infinite' stops playing if phone suspends
2014-11-05 12:43:35 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. Looping is essential for the app I am writing (a white noise relaxation/sleep aid app). I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. Also, setting 'loops' to a number, eg, 'loops: 10' doesn't work either (it stops once the phone suspends). Looping is essential for the app I am writing (a white noise relaxation/sleep aid app).
2014-11-05 12:45:59 Jamie Strandboge summary 'loops: Audio.Infinite' and 'loops: MediaPlayer.Infinite' stops playing if phone suspends 'loops: Audio.Infinite' and 'loops: MediaPlayer.Infinite' stops playing if phone suspends or app goes to the background
2014-11-05 12:57:54 Jamie Strandboge description I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. Also, setting 'loops' to a number, eg, 'loops: 10' doesn't work either (it stops once the phone suspends). Looping is essential for the app I am writing (a white noise relaxation/sleep aid app). I'm using the following:     Audio {         id: playAudio         autoLoad: true         autoPlay: true         loops: Audio.Infinite         source: "./file.mp3"     } and the file plays fine and will loop. However, if the phone suspends (either by pressing the power button or letting it suspend on its own), however the file won't loop until the phone is unsuspended and the application brought to the foreground. The same happens if the app goes to the background. I also tried:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3"     } but same problem. Watching the log output from ~/cache/upstart/... I can see that when the file finishes, a status change is sent, but when the phone suspends, it stops sending status changes. I tried looking at onStatusChanged, like this:     MediaPlayer {         id: playAudio         autoLoad: true         autoPlay: true         loops: MediaPlayer.Infinite         source: "./file.mp3" onStatusChanged: {             console.log("status changed: " + status)             if (status === MediaPlayer.EndOfMedia) {                 seek(0)                 play()             }         }     } but it didn't seem to work. Also, setting 'loops' to a number, eg, 'loops: 10' doesn't work either (it stops once the phone suspends). Looping is essential for the app I am writing (a white noise relaxation/sleep aid app). I'm guessing this is happening because of application lifecycle. However, we always said that while apps can't have background services, we would write system services that would act on app's behalf. media-hub is that service for sound apps and it isn't working as well as it could with these types of apps. AIUI, music-app has a lifecycle exception, but I think we could be a lot smarter about things to improve the situation for app developers. Eg: * allow looping by all apps for the foreground app if the device suspends if the device is connected to power * if we had that, then we could allow looping by apps that are in the background * music-app currently has a lifecycle exception, which is limiting. Unconditionally allowing looping while on power improves things a lot, but if we are really worried about background playing, put it in the user's control. Have a trust-store prompt if the device is on battery and wants to loop a long time, then cache the result. Eg "You are on battery power but the white noise app wants to loop indefinitely. Allow it to do so?".
2015-07-13 13:14:44 Jim Hodapp media-hub (Ubuntu): status New In Progress
2015-07-13 13:14:47 Jim Hodapp media-hub (Ubuntu): assignee Jim Hodapp (jhodapp)
2015-07-13 13:14:59 Jim Hodapp bug task added media-hub (Ubuntu RTM)
2015-07-13 13:15:05 Jim Hodapp media-hub (Ubuntu RTM): assignee Jim Hodapp (jhodapp)
2015-07-13 13:15:09 Jim Hodapp media-hub (Ubuntu RTM): status New Triaged