{ "id": "142141", "key": "TIMOB-18297", "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": [ { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-04T13:48:37.000+0000", "created": "2014-12-30T05:18:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-04T13:48:37.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": "When Audio Player is interrupted mid play and stopped, it cannot start again. This occurs on Nexus 6 with Android 5.0 Lollipop.\r\n\r\nCode as follows:\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Audio Test',\r\n backgroundColor:'#fff',\r\n layout: 'vertical'\r\n});\r\n\r\nvar startStopButton = Titanium.UI.createButton({\r\n title:'Start/Stop Streaming',\r\n top:10,\r\n width:200,\r\n height:40\r\n});\r\n\r\nvar pauseResumeButton = Titanium.UI.createButton({\r\n title:'Pause/Resume Streaming',\r\n top:10,\r\n width:200,\r\n height:40,\r\n enabled:false\r\n});\r\n\r\nwin.add(startStopButton);\r\nwin.add(pauseResumeButton);\r\n\r\n// allowBackground: true on Android allows the \r\n// player to keep playing when the app is in the \r\n// background.\r\nvar audioPlayer = Ti.Media.createAudioPlayer({ \r\n url: 'https://ia902508.us.archive.org/5/items/testmp3testfile/mpthreetest.mp3',\r\n allowBackground: true\r\n}); \r\n \r\nstartStopButton.addEventListener('click',function() {\r\n // When paused, playing returns false.\r\n // If both are false, playback is stopped.\r\n if (audioPlayer.playing || audioPlayer.paused)\r\n {\r\n audioPlayer.stop();\r\n pauseResumeButton.enabled = false;\r\n if (Ti.Platform.name === 'android')\r\n { \r\n audioPlayer.release();\r\n } \r\n }\r\n else\r\n {\r\n audioPlayer.start();\r\n pauseResumeButton.enabled = true;\r\n }\r\n});\r\n\r\npauseResumeButton.addEventListener('click', function() {\r\n if (audioPlayer.paused) {\r\n audioPlayer.start();\r\n }\r\n else {\r\n audioPlayer.pause();\r\n }\r\n});\r\n\r\naudioPlayer.addEventListener('progress',function(e) {\r\n Ti.API.info('Time Played: ' + Math.round(e.progress) + ' 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\nwin.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\nwin.open();\r\n{code}\r\n\r\nLogs as follows:\r\n{code}\r\n[WARN] : V8Object: (KrollRuntimeThread) [81,81] Runtime disposed, cannot set property 'userAgent'\r\n[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = text.com.NewtestActivity@3ad081fa\r\n[INFO] : Adreno: EGLInit: QTI Build: 10/14/14, 40a273b, I86da836d38\r\n[INFO] : OpenGLRenderer: Initialized EGL, version 1.4\r\n[INFO] : State: starting (4)\r\n[ERROR] : MediaPlayer: Should have subtitle controller already set\r\n[INFO] : State: initialized (1)\r\n[INFO] : State: playing (3)\r\n[INFO] : Time Played: 1332 milliseconds\r\n[INFO] : Time Played: 2351 milliseconds\r\n[INFO] : Time Played: 3370 milliseconds\r\n[INFO] : Time Played: 4310 milliseconds\r\n[INFO] : Time Played: 5329 milliseconds\r\n[INFO] : Time Played: 6348 milliseconds\r\n[INFO] : Time Played: 7367 milliseconds\r\n[INFO] : Time Played: 8307 milliseconds\r\n[INFO] : Time Played: 9326 milliseconds\r\n[INFO] : Time Played: 10344 milliseconds\r\n[INFO] : Time Played: 11363 milliseconds\r\n[INFO] : Time Played: 12330 milliseconds\r\n[INFO] : State: playing (3)\r\n[INFO] : Time Played: 1332 milliseconds\r\n[INFO] : Time Played: 2351 milliseconds\r\n[INFO] : State: stopping (6)\r\n[INFO] : State: stopped (5)\r\n[WARN] : MediaPlayer: mediaplayer went away with unhandled events\r\n[INFO] : State: starting (4)\r\n[INFO] : APSAnalyticsService: Analytics Service Started\r\n[INFO] : APSAnalyticsService: Stopping Analytics Service\r\n[ERROR] : MediaPlayer: error (1, -2147483648)\r\n[ERROR] : MediaPlayer: Error (1,-2147483648)\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: On Lollipop AudioPlayer not playing after stopping stream and restarting it", "creator": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "subtasks": [], "reporter": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "environment": "SDK: 3.5.0.v20141217170926\r\nTitanium Studio, build: 3.4.1.201410281727\r\nDevice: Nexus 6 (v5.0)", "comment": { "comments": [ { "id": "338635", "author": { "name": "ianthomas0", "key": "ianthomas0", "displayName": "Ian Thomas", "active": true, "timeZone": "America/Havana" }, "body": "This also happens on Nexus 7 (2012) with Android 5.0.2. I have found that if you clear the app data cache, you can attempt to play the audio file again. If you don't, you can never play the audio file again. Because of this, it appears there is a bug with AudioPlayer.release().", "updateAuthor": { "name": "ianthomas0", "key": "ianthomas0", "displayName": "Ian Thomas", "active": true, "timeZone": "America/Havana" }, "created": "2015-01-11T21:07:00.000+0000", "updated": "2015-01-11T21:07:00.000+0000" }, { "id": "349823", "author": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For a Nexus 6, I worked around the issue, by each time adding a timestamp to the stream url.\r\nThis works on a Nexus 6 with Android 5.1. (tested with Ti 3.5.1.GA).\r\n\r\nOn Android 5.0.1. with a Samsung Galaxy S4 with an app compiled with Ti 3.5.1.GA this also works, however, it takes about 10 seconds(!) before the stream initializes and starts playing.\r\nSame app package installed on the same device with Android 4.4 starts shoutcast stream playback immediately.\r\nIt looks like the good old Android 2.2 behavior is back... at least for Android 5.0.1. on a Samsung Galaxy S4.", "updateAuthor": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-16T11:54:16.000+0000", "updated": "2015-04-16T11:54:16.000+0000" }, { "id": "349825", "author": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "karaoak", "key": "karaoak", "displayName": "Frank Eijking", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-16T12:39:53.000+0000", "updated": "2015-04-16T12:40:33.000+0000" }, { "id": "362163", "author": { "name": "WVersluijs", "key": "wversluijs", "displayName": "Wouter Versluijs", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is there any update on this ticket?\r\nThis issue still seems to be in effect on the Android M Beta, but even worse.\r\n\r\nWhen I use the audioPlayer to play a webstream (ie. http://eu7.fastcast4u.com:8128/stream) it won't play at all on Android M (LG Nexus 5). All I get is the following error \"Unknown media error\".\r\nAlso adding a cache buster behind the url, it won't work. When playing normal .mp3 files from the web it does work.\r\n\r\n*Please note* that this seems to work on Android 5.0.1 (Samsung Galaxy S4) and all versions prior to that.", "updateAuthor": { "name": "WVersluijs", "key": "wversluijs", "displayName": "Wouter Versluijs", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-09-03T10:53:44.000+0000", "updated": "2015-09-03T10:53:44.000+0000" }, { "id": "447103", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10800", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-03-23T20:10:26.000+0000", "updated": "2019-03-23T20:10:26.000+0000" }, { "id": "451403", "author": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR passed. Audio player works fine upon resume or restart. Also no warnings shown.", "updateAuthor": { "name": "ssekhri", "key": "ssekhri", "displayName": "Satyam Sekhri", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-16T17:50:00.000+0000", "updated": "2019-09-16T17:50:00.000+0000" }, { "id": "451849", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "*FR Passed*\r\n\r\nTest environment:\r\nStudio Ver: 5.1.4.201909061933\r\nSDK Ver: 8.3.0.v20191003144543\r\nOS Ver: 10.14.6\r\nAppc NPM: 4.2.15\r\nAppc CLI: 7.1.1\r\nNode Ver: 10.16.3\r\nNPM Ver: 6.11.3\r\nEmulator: ⇨ Android 5.1.1 (Nexus 6 - Lollipop)\r\n\r\nTicket closed.\r\n\r\n", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-04T13:48:02.000+0000", "updated": "2019-10-04T13:48:02.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }