{ "id": "62767", "key": "TIMOB-2135", "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": "12085", "description": "Mobile @ HQ", "name": "Sprint 2011-45", "archived": true, "released": true, "releaseDate": "2011-11-14" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-03T15:13:10.000+0000", "created": "2011-04-15T03:11:29.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "module_media", "qe-testadded", "regression" ], "versions": [ { "id": "11225", "name": "Release 1.5.0", "archived": true, "released": true, "releaseDate": "2010-12-14" } ], "issuelinks": [ { "id": "14693", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "85248", "key": "TIMOB-7315", "fields": { "summary": "Android: Titanium.Media.AudioPlayer: cannot unpause or start player depending on scope of source code", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-10T06:07:49.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": "{html}
Hi,
\r\nI'm currently finding that when I create an event listener that\r\nlistens to the audioPlayer change state, the state reported varies\r\nwidely across platforms and even devices.
\r\nTake the following code for instance (no affiliation with the\r\nURL, just for example purposes:)
\r\n\r\n\r\nTi.API.log(\"Audio Stream App Started\");\r\n \r\nvar url ='http://www.parishiltonjustme.com/downloads/audio/08_Screwed.mp3';\r\n \r\nvar streamer1 = Ti.Media.createAudioPlayer();\r\n \r\nstreamer1.addEventListener('change',function(e)\r\n{ \r\n Ti.API.log(\"AudioPlayer addEventListener 'change' says : \"+e.description);\r\n});\r\n \r\nstreamer1.url = url;\r\n \r\nstreamer1.start();
\r\n
\r\nWhen this runs, i get several different results depending on\r\ndevice OS and even device vs. emulator.(see below)
\r\nIn some instances,there is no report of a stopping or stopped\r\nstate. Considering this, for instance, how might one go about\r\ncreating a music stream player that auto-advances on all devices in\r\nTitanium Mobile?
\r\nI first tried the developer support forum on this one a couple\r\nweeks back, although no responses there.
\r\n\r\nhttp://developer.appcelerator.com/question/68291/audioplayer-change...
\r\nThanks,
\r\nDarin
iPhone 4.1 Emulator
\r\n[INFO] Audio Stream App Started\r\n[INFO] AudioPlayer addEventListener 'change' says : waiting_for_data\r\n[INFO] AudioPlayer addEventListener 'change' says : waiting_for_data\r\n[INFO] AudioPlayer addEventListener 'change' says : waiting_for_queue\r\n[INFO] AudioPlayer addEventListener 'change' says : playing\r\n[INFO] AudioPlayer addEventListener 'change' says : stopping\r\n[INFO] AudioPlayer addEventListener 'change' says : stopped\r\n[INFO] AudioPlayer addEventListener 'change' says : initialized
\r\n
\r\nAndroid 1.6 Emulator\r\n[INFO] Audio Stream App Started\r\n[INFO] AudioPlayer addEventListener 'change' says : starting\r\n[INFO] AudioPlayer addEventListener 'change' says : initialized\r\n[INFO] AudioPlayer addEventListener 'change' says : playing\r\n[INFO] AudioPlayer addEventListener 'change' says : playing
\r\n
\r\n^never reports stopping or stopped^\r\nAndriod 2.2 Emulator
\r\n[INFO] Audio Stream App Started\r\n[INFO] AudioPlayer addEventListener 'change' says : starting\r\n[INFO] AudioPlayer addEventListener 'change' says : initialized\r\n[INFO] AudioPlayer addEventListener 'change' says : playing\r\n[INFO] AudioPlayer addEventListener 'change' says : playing\r\n[INFO] AudioPlayer addEventListener 'change' says : stopping\r\n[INFO] AudioPlayer addEventListener 'change' says : stopped
\r\n
\r\nAndroid 2.2 T- Mobile G2 (ADB logcat)\r\nI/TiAPI ( 4260): (kroll$3) [22,25] [Audio Stream App Started] null\r\nI/TiAPI ( 4260): (kroll$3) [2207,2232] [AudioPlayer addEventListener 'change' says : starting] null\r\nI/TiAPI ( 4260): (kroll$3) [33,2265] [AudioPlayer addEventListener 'change' says : initialized] null\r\nI/TiAPI ( 4260): (kroll$3) [4,2269] [AudioPlayer addEventListener 'change' says : playing] null\r\nI/TiAPI ( 4260): (kroll$3) [2,2271] [AudioPlayer addEventListener 'change' says : playing] null
\r\n
\r\n^never reports stopping or stopped^I'm having this problem too; more specifically, stopping/stopped\ndoesn't fire on any Android 2.1 that I tried (both emulator and a\nreal device). playing/initializing/etc all work fine.
\nThis is a blocker for my app, I can't build a good media player\nwith a playlist if I don't know when a song stops playing :(
\nFor now, I'm using a function being run at intervals that checks\nthe playing and waiting properties, but this isn't a real solution\nto this issue.
I'm having this problem as well. Seems to be related to the\n1.5.x branch, tested 1.5, 1.5.1 and the 1.5.2 build from Dec 27\n2010 12:47 r9a159e76 - The change event does not work. Tested it on\nthe Audioplayer version of Kitchen sink. Attached the project.
\nTested the same on project on 1.4.2 and the latest master: Dec 28\n2010 21:19 r9157d0d9 and it works.
Not sure why this is not getting any attention. The player state\ndoes not change. Can anyone at least confirm whether this is a real\nbug or not?
\ntagged:\"1.5.x\" tagged:state tagged:audio
I'm still waiting for somebody to tell me if I am dreaming or\nnot on this one. It's kind of killed my development of a radio\nstation app, at least under 1.5.1 when building for the iPhone.
\nI can build OK under Appcelerator SDK 1.4x but because of\nanother bug whereby my app seems not to want to run under iOS3.1 I\nwas hoping that the latest of everything would be 'the fix'.
\nI use the 'change' event to monitor the stream so the stop/start\nbutton can change it's icon in response to the actual stream, also\nto supply a user with some text as to what's going on - i.e.\n\"Buffering\", \"Stopping\" etc.
I've verified that the change event does not work in 1.5.1 as\nwell. Re: http://developer.appcelerator.com/helpdesk/view/62371
\nThe audio change event works in 1.6.
Audio Events do not appear to be working in 1.6 either - I've\ndone multiple clean builds on the latest daily snapshots, and it's\nnot working:
\nhttp://developer.appcelerator.com/helpdesk/view/62371
\nI just got done testing the latest build here:
\nhttp://builds.appcelerator.com.s3.amazonaws.com/index.html
\n(Jan 21 2011 19:11 rfcfcc850)
\nand events are not working for me.
@talldude: it is working for me with this build: \"Jan 21 2011\n19:11 rfcfcc850\" on http://builds.appcelerator.com.s3.amazonaws.com/index.html