{ "id": "132365", "key": "TIMOB-19519", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-01-13T20:46:38.000+0000", "created": "2014-06-27T20:04:39.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "TCSupportTriage" ], "versions": [], "issuelinks": [ { "id": "55314", "type": { "id": "10122", "name": "Gantt: start-finish", "inward": "is triggered by", "outward": "is triggering" }, "outwardIssue": { "id": "168684", "key": "TIMOB-24909", "fields": { "summary": "iOS: Move Ti.Media.AudioPlayer to AVPlayer internally, remove external library-dependency", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:41:07.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "I use Ti.Media.AudioPlayer to play remote mp3s. If I pause the player, lock the screen, wait for ~30 seconds, wake it up and resume the playback, the audio plays for a few seconds and then stops. This is a big issue.\r\n\r\nTo reproduce:\r\n\r\n1. Create a default alloy project.\r\n2.Replace index.js with the following code:\r\n~~~\r\nTi.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;\r\nfunction doClick(e) {\r\n audioplayer.pause();\r\n}\r\nvar audioplayer = Ti.Media.createAudioPlayer({url:'http://www.stephaniequinn.com/Music/Vivaldi%20-%20Spring%20from%20Four%20Seasons.mp3'});\r\naudioplayer.play();\r\n$.index.open();\r\n~~~\r\n3. add the following to tiapp.xml (ios->plist->dict)\r\n~~~\r\nUIBackgroundModes\r\n\r\n audio\r\n\r\n~~~\r\n4. Launch the app. Wait for the music to play.\r\n5. Pause the music by clicking \"Hello, World.\"\r\n6. Go to Home (optional)\r\n7. Lock the device. Wait for ~30 seconds.\r\n8. Unlock the device. Open the app. Resume the music by clicking \"Hello, World.\"\r\n9. The audio plays for a few seconds and then stop. Error: No audio data found.\r\n10. Sometimes the error doesn't show up (rarely). Repeat from 5 - 9 until the error shows.\r\n\r\nThis test is run on an iPad 4. iOS 8. SDK 4.1.0.", "attachment": [], "flagged": false, "summary": "iOS - Ti.Media.AudioPlayer - error after sleep/wake", "creator": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "SDK 4.1.0. iOS 8.", "closedSprints": [ { "id": 985, "state": "closed", "name": "2018 Sprint 01 SDK", "startDate": "2017-12-31T16:58:54.631Z", "endDate": "2018-01-14T16:58:00.000Z", "completeDate": "2018-01-17T22:44:27.028Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "311567", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~shawnlan]!\r\n\r\nCan you please provide a testcase for this issue? So we can reproduce it and move this issue to Platform. \r\n\r\nThanks a lot! ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-06-30T07:01:28.000+0000", "updated": "2014-06-30T07:01:28.000+0000" }, { "id": "311657", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I updated the description to include steps to reproduce the issue. Please take a look. Thanks.", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-30T18:19:00.000+0000", "updated": "2014-06-30T18:19:00.000+0000" }, { "id": "311719", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also found that it couldn't play a remote mp3 longer than 10 minutes in the background, if I locked the screen manually during the audio playing. At some point the audio stopped and received the error.", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-30T23:40:59.000+0000", "updated": "2014-06-30T23:40:59.000+0000" }, { "id": "313119", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Try which one?", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-09T23:22:11.000+0000", "updated": "2014-07-09T23:22:11.000+0000" }, { "id": "313124", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "[~shawnlan] sorry, internal comment. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-09T23:29:42.000+0000", "updated": "2014-07-09T23:29:42.000+0000" }, { "id": "313631", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello \r\n\r\nWe tested this issue in my device with given test code. We cant reproduces this error in following test environments. Please check your network connect and other setting. I hope it will solve your problem. \r\n \r\nh5. Test Environment \r\nTi SDK 3.2.3.GA\r\nTi CLI 3.3.0-rc\r\niPad 4. iOS 7 \r\n\r\nh5. Step To Test:\r\n \r\n1. Create a default alloy project.\r\n2. Replace index.js with the following code:\r\n \r\n{code}\r\nTi.Media.audioSessionMode = Ti.Media.AUDIO_SESSION_MODE_PLAYBACK;\r\nfunction doClick(e)\r\n \r\n{ audioplayer.pause(); }\r\nvar audioplayer = Ti.Media.createAudioPlayer(\r\n \r\n{url:'http://www.stephaniequinn.com/Music/Vivaldi%20-%20Spring%20from%20Four%20Seasons.mp3'}\r\n);\r\naudioplayer.play();\r\n$.index.open();\r\n{code}\r\n \r\n \r\n3. add the following to tiapp.xml (ios->plist->dict)\r\n \r\n{code}\r\nUIBackgroundModes\r\n\r\naudio\r\n\r\n{code}\r\n \r\n4. Add the following to index.xml\r\n \r\n{code}\r\n\r\n\t\r\n\t\t