{ "id": "127763", "key": "TIMOB-16638", "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": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" }, { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-04T07:40:22.000+0000", "created": "2014-03-17T21:55:58.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-09-12T22:35:29.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": "I’m porting over a Titanium application to Android that currently works on iOS that essentially plays streaming audio files. For some reason I’m getting stuck on the very simple task of determining the current playback position of the audio file being played.\r\n\r\nThe first part works fine, just simply playing a streaming audio file:\r\n\r\nsound = Ti.Media.createAudioPlayer({\r\n url: ‘http://server.com/audiofile.mp3'\r\n});\r\nsound.play();\r\n\r\nThen, I created a simple Interval routine that runs every second and shows what the “time”, “getTime”, and “progress” variables are showing. The documentation says that “time” and “getTime” are for Android only, and the “progress” is for iOS only. As expected, the “progress” variable says “undefined”, which makes sense. But “time” and “getTime” shows as “0” constantly.\r\n\r\nvar tempIntCount = 0;\r\ntrackTempInterval = setInterval(function() {\r\n tempIntCount++;\r\n var tv2 = sound2.getTime();\r\n status.text = tempIntCount+'-'+sound2.time+'-'+tv2+'-'+sound2.progress;\r\n},1000);\r\n\r\nYou’ll see that I’m also incrementing my own variable “tempIntCount” every second just to make sure it’s alive, and that works perfectly.\r\nSince the Titanium documentation says that the “time” variable requires Android 3.3, I’ve also added the following in the tiapp.xml file which doesn’t seem to help:\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Unable to determine audio playback position with createAudioPlayer", "creator": { "name": "scottblum", "key": "scottblum", "displayName": "Scott Blum", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "scottblum", "key": "scottblum", "displayName": "Scott Blum", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio Build 3.2.1 - Android SDK 16 (Jelly Bean 4.1)", "comment": { "comments": [ { "id": "297673", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with the following simple test case on Android.\r\n\r\n{code}\r\nsound = Ti.Media.createAudioPlayer({\r\n url: 'http://www.televisiontunes.com/themesongs/The%20Gadget%20Show.mp3'\r\n});\r\nsound.play();\r\n \r\nvar tempIntCount = 0;\r\ntrackTempInterval = setInterval(function() {\r\n tempIntCount++;\r\n console.log('Current position:' + sound.time);\r\n console.log('Current position:' + sound.getTime());\r\n console.log('Current count: ' + tempIntCount);\r\n},1000);\r\n{code}", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-18T05:43:47.000+0000", "updated": "2014-03-18T05:43:47.000+0000" }, { "id": "321751", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce in \r\nTitanium SDK version 3.4.0 master, 3.3.0.GA\r\n\r\nIssue reproduces in\r\nTitanium SDK version 3.2.2.GA, 3.2.3.GA\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T07:39:17.000+0000", "updated": "2014-09-04T07:39:17.000+0000" }, { "id": "323454", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nNow we can determine audio playback position.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 3.4.0.201409112242\r\nTi SDK : 3.4.0.v20140912120914\r\nMac OSX : 10.9.4\r\nAlloy : 1.5.0-rc\r\nCLI - 3.4.0-rc2\r\nCode Processor: 1.1.1\r\nSony Experia - android 4.1.2\r\nNexus 5 - android 4.4.4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T22:35:21.000+0000", "updated": "2014-09-12T22:35:21.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }