{ "id": "138372", "key": "TIMOB-17883", "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": "6", "description": "", "name": "Hold" }, "resolutiondate": "2014-11-12T00:42:59.000+0000", "created": "2014-10-22T00:17:31.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-3.4.1" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T18:05:35.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h6. This issue is seen when streaming audio too & not just local file.\r\n\r\nh5.Description:\r\n1. Create a classic app & replace the app.js with the following code:\r\n{code}\r\nvar _window = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n\tlayout:'vertical'\r\n});\r\n\r\nvar startButton = Titanium.UI.createButton({\r\n\t title:'Start Playing',\r\n\t top:10,\r\n\t width:200,\r\n\t height:40\r\n\t});\r\n\t \r\nvar stopButton = Titanium.UI.createButton({\r\n title:'Stop playing',\r\n top:10,\r\n width:200,\r\n height:40,\r\n enabled:true\r\n});\r\n \r\n_window.add(startButton);\r\n_window.add(stopButton);\r\n \r\nvar audioPlayer = Ti.Media.createAudioPlayer({ \r\n url: 'Uppermost - Flow.mp3',\r\n allowBackground: true\r\n}); \r\n \r\nstartButton.addEventListener('click',function() {\r\n audioPlayer.start();\r\n});\r\n \r\nstopButton.addEventListener('click', function() {\r\n audioPlayer.stop();\r\n});\r\n \r\naudioPlayer.addEventListener('progress',function(e) {\r\n Ti.API.info('Time Played: ' + Math.round(e.progress) + '/' + audioPlayer.getDuration() + 'milliseconds');\r\n});\r\n \r\naudioPlayer.addEventListener('change',function(e)\r\n{\r\n Ti.API.info('State: ' + e.description + ' (' + e.state + ')');\r\n});\r\n \r\n_window.addEventListener('close',function() {\r\n audioPlayer.stop();\r\n if (Ti.Platform.osname === 'android')\r\n { \r\n audioPlayer.release();\r\n }\r\n});\r\n\r\n_window.open();\r\n{code}\r\n2. Use the attached audio file in your app.\r\n3. Build for device flashed with android 5.0 preview.\r\n4. After the app launches press the \"Start Playing\" button.\r\n5. The audio player will start playing.\r\n6. Press the \"Stop Playing\" button.\r\n7. The audio player will stop playing.\r\n8. Now again press the \"Start Playing\" button.\r\n\r\nh5. Actual Result:\r\n1. The audio player does not play when the \"Start Playing\" button is pressed the second time.\r\n2. On a non android 5.0 device(Samsung galaxy S4 - android 4.4.2) the audio player stops and starts as expected.\r\n\r\nh5.Expected Result:\r\n1. The audio player should start again after it has been stopped.\r\n", "attachment": [ { "id": "52100", "filename": "Uppermost - Flow.mp3", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-22T00:18:15.000+0000", "size": 4109324, "mimeType": "audio/mp3" } ], "flagged": false, "summary": "Android 5.0: Audio player does not start/resume once stopped", "creator": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Environment:\r\nAppc Studio : 3.4.1.201410191611\r\nTi SDK : 3.4.1.v20141021093856\r\nMac OSX : 10.9.4\r\nAlloy : 1.5.1\r\nCLI - 3.4.0\r\nCode Processor: 1.1.1\r\nNexus 5 - android 5.0 preview", "comment": { "comments": [ { "id": "328969", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FYI. Placing this into Triage.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-22T04:27:02.000+0000", "updated": "2014-10-22T04:27:02.000+0000" }, { "id": "329257", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I am seeing this sometimes, where the audio does not start streaming at the first time when the app is run.\r\nNot sure if its the same cause as this ticket, if not please comment & I will open a separate ticket for it.\r\n\r\n ", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-23T23:17:30.000+0000", "updated": "2014-10-23T23:17:48.000+0000" }, { "id": "330240", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The media hangs indefnitely on prepare() call. After some researching, looks like a native problem: https://code.google.com/p/android-developer-preview/issues/detail?id=1787", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-31T22:42:12.000+0000", "updated": "2014-10-31T22:42:12.000+0000" }, { "id": "331728", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It appears to be a Google bug. Resolving on hold.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-12T00:42:59.000+0000", "updated": "2014-11-12T00:42:59.000+0000" }, { "id": "413861", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed and that the issue was a Goggle bug and nothing to do with us.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T18:05:35.000+0000", "updated": "2017-03-20T18:05:35.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }