{ "id": "64007", "key": "TIMOB-3375", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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:47:34.000+0000", "created": "2011-04-15T03:43:29.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [], "issuelinks": [ { "id": "55315", "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 } } } }, { "id": "28192", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "113468", "key": "TIMOB-13704", "fields": { "summary": "Android: Add setTime() method to allow playback from arbitrary locations in a stream", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:41:06.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": "*Problem description*\r\nTi.Media.AudioPlayer is lacking several features. Because of this, developing an audio player with the current API is not possible. For example, Ti.Media.Sound has a duration property, which isn't available in Ti.Media.AudioPlayer.\r\n\r\n*Proposed fixes (available in linked repositry)*\r\n- ADD duration read-only property\r\n- ADD time property (for seeking)\r\n- ADD volume property\r\n- ADD next/prev and seeking remote control events\r\n- FIX play/pause remote controls don't work when using background audio\r\n- FIX changing the URL doesn't work (unless you stop first)\r\n- FIX progress events only fire for the first URL\r\n\r\nAlso suggested on http://stackoverflow.com/q/35157844/4626813\r\n- Expose contentType header to be send when retrieving the file/stream", "attachment": [], "flagged": false, "summary": "TiAPI: Implement several missing Ti.Media.AudioPlayer features", "creator": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "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": "130625", "author": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

In iOS, Ti.Media.AudioPlayer is missing many key features and\nhas a few bugs as well. I have been working on them in Instant\nAutomatic's fork and will be submitting a pull request to\nAppcelerator soon.

\n

For completeness, here is what I am working on:
\n-ADD duration read-only property -ADD time property (for seeking)\n-ADD volume property -ADD next/prev and seeking remote control\nevents -FIX play/pause remote controls don't work when using\nbackground audio -FIX changing the URL doesn't work (unless you\nstop first) -FIX progress events only fire for the first URL

\n

Let me know if I am missing anything.

{html}", "updateAuthor": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:29.000+0000", "updated": "2011-04-15T03:43:29.000+0000" }, { "id": "130626", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

It is missing many things..another one is seek definitely. What\nis Instant Automatic? I would love to see the features added

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:30.000+0000", "updated": "2011-04-15T03:43:30.000+0000" }, { "id": "130627", "author": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Instant Automatic is a mobile applications startup that I work\nfor. We currently use Titanium to develop our applications.

\n

I have completed and tested all the work I described above and\npushed it to our fork on Titanium: https://github.com/organizations/instantautomatic

\n

I will be doing even more testing early next week and then I\nwill submit the pull request to Appcelerator. I have no clue what\ntheir process is for responding to pull requests.

{html}", "updateAuthor": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:30.000+0000", "updated": "2011-04-15T03:43:30.000+0000" }, { "id": "130628", "author": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

whoa that is really cool! I haven't looked into the user\nsubmitted plugins for Ti yet. Any examples of how someone would use\nyour new code? You write the plugin in obj-c right?

{html}", "updateAuthor": { "name": "ronnieswietek", "key": "ronnieswietek", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:30.000+0000", "updated": "2011-04-15T03:43:30.000+0000" }, { "id": "130629", "author": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Titanium does offer support for custom modules and we have\ndeveloped some of these for our projects, but this is not a custom\nmodule. I have made these changes to Titanium itself (specifically,\nTi.Media.AudioPlayer). I will be submitting a pull request with\nupdates to the Kitchen Sink that showcase all of the new\nfunctionality.

\n

Both Titanium and custom modules (for iOS) are written in\nObjective-C.

\n

Feel free to clone or fork the Instant Automatic fork of\nTitanium and play with the new features.

{html}", "updateAuthor": { "name": "gerrycardinaliii", "key": "gerrycardinaliii", "displayName": "Gerry Cardinal III", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:43:30.000+0000", "updated": "2011-04-15T03:43:30.000+0000" }, { "id": "166007", "author": { "name": "stefan schleich", "key": "stefan schleich", "displayName": "Stefan Schleich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I've just tested Gerry's changes to the AudioPlayer and they work pretty well! Is there a chance his changes get merged into the official mobile SDK?\r\n\r\nGerry, thanks for the great work!", "updateAuthor": { "name": "stefan schleich", "key": "stefan schleich", "displayName": "Stefan Schleich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-14T10:21:58.000+0000", "updated": "2011-09-14T10:22:43.000+0000" }, { "id": "239887", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Gerry, \n\nDid you manage to submit a pull request for this? We'd really appreciate it if you did, or if you already have a link would be great. Thanks! \n\nNew URL where the commits can be found is here: https://github.com/instantautomatic/titanium_mobile/tree/master/iphone/Classes/AudioStreamer ", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-26T23:10:38.000+0000", "updated": "2013-02-26T23:10:38.000+0000" }, { "id": "352547", "author": { "name": "Pablex05", "key": "pablex05", "displayName": "Juan Pablo Gonzalez Barrientos", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Does someone has a workaround to \"setTime()\" method for IOS. Thank you!", "updateAuthor": { "name": "Pablex05", "key": "pablex05", "displayName": "Juan Pablo Gonzalez Barrientos", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-14T18:16:10.000+0000", "updated": "2015-05-14T18:16:10.000+0000" }, { "id": "352563", "author": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "body": "I wish. I was just looking all over the net for a third party audio player module for ios. I found some for android, but none for ios. Maybe it would be possible to pull the code from the titanium audio player into a new module and add Gerry's changes. I might try that for the next revision of our app.", "updateAuthor": { "name": "jpriebe", "key": "jpriebe", "displayName": "Jason Priebe", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-14T19:08:24.000+0000", "updated": "2015-05-14T19:08:24.000+0000" }, { "id": "359189", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "While trying to implement an audio player, I've also come against the lack of functionality listed in this issue when it comes to providing a viable product to play remote audio. \r\n\r\nOne of the missing methods is a 'seek' (setTime). Bizarrely the AudioStreamerCUR.m currently used in the Titanium SDK already contains a seekToTime:time method but this has yet to be implemented. \r\n\r\nThe reason that I need a seek is to overcome an issue which occurs when you try and pause a streaming mp3 url with Ti.Media.audioPlayer. What I found was that after resuming the paused audio, the STOPPING and STOPPED events will fire after a few seconds, ending the audio before it should. As if some data in the audio buffer has just been *forgotten*. So, I wanted to try and take a note of the current progress time when paused, then instead of just 'start'ing the playback again, I'd seek to the paused time and continue playback. (This does require the remote url to support Partial Content, since that's how seekToTime works.)\r\n\r\nDuring the past few days research on the matter, I found a module which employs the same seekToTime method from Matt Gallagher's AudioStreamer library. It does work, but has some glitches. https://github.com/atsusy/tiaudiostreaming\r\n\r\nThe trouble is, is that the versions being used by this module *and* the Ti SDK are woefully out of date. The Github Network Graph of the AudioStreamer project [ https://github.com/mattgallagher/AudioStreamer/network ] shows many years of improvements. The furthest being Alex Crichton's https://github.com/alexcrichton/AudioStreamer where much mode modern methods are employed and many deprecations removed. (AudioStreamer was written before Apple even released the iPhone 3GS, in 2008! ;) ) \r\n\r\nThe latest version on his branch also has a host of new features, such as metadata from ShoutCast servers, ID3 tags, etc. \r\n\r\nAfter even further research, I've also found that maybe a solution with AVFoundation/AVPlayer might be worth a shot. I'm going to attempt to build a module (and I don't *do* Objective-C ;) ) and see how I get on.\r\n\r\nK\r\n", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2015-08-06T14:56:39.000+0000", "updated": "2015-08-06T15:04:34.000+0000" }, { "id": "359407", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "If anyone's interested, here's a stab I've had at building a module based on AVPlayer to try and replicate/replace/update the Ti.Media.audioPlayer. It's a bit shoddy and thrown together by someone who doesn't quite know what he's doing, but it's a start and it works. ;) It provides seek and speed (rate) methods too. \r\n\r\nhttps://github.com/kosso/TiAVPlayer\r\n\r\n", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2015-08-09T22:22:35.000+0000", "updated": "2015-08-09T22:22:35.000+0000" }, { "id": "373633", "author": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Kosso,\r\n\r\nI started using your module. It works great. Now I want to try your android module: https://github.com/kosso/tiandroidaudioplayer and hope it's in parity with https://github.com/kosso/TiAVPlayer so that I can re-use my code. But looks like it doesn't. For example, the debug tells me it doesn't have seekThenPlay(). Is it incomplete? Or did I miss anything?\r\n\r\nThanks a lot!", "updateAuthor": { "name": "shawnlan", "key": "shawnlan", "displayName": "Shawn Lan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-30T18:04:33.000+0000", "updated": "2015-12-30T18:04:33.000+0000" }, { "id": "373636", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "Hi,\r\n\r\nProbably best to keep this discussion on GitHub but a) Thanks! ;) and b) \r\n\r\nyou should be able to use audioPlayer.seek(new_ms);\r\n\r\nwhere audioPlayer refers to either the iOS or Android module and it should work (and play) and set the time in ms. \r\n\r\nI have a feeling I didn't finish up the seekComplete event on both as I didn't need it in the app I was working on. \r\n\r\nBut mostly, everything works fine across both platforms for live radio streams and remote audio urls (mp3, m4a, etc).\r\n\r\nCheers!\r\n\r\n", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2015-12-30T18:20:27.000+0000", "updated": "2015-12-30T18:20:27.000+0000" }, { "id": "374309", "author": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "body": "any update on this? Being able to seek/scrub to a specific position/time is basic functionality that any audio player should be able to handle.", "updateAuthor": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "created": "2016-01-12T16:14:01.000+0000", "updated": "2016-01-12T16:14:01.000+0000" }, { "id": "375898", "author": { "name": "patrickmounteney", "key": "patrickmounteney", "displayName": "Patrick Mounteney", "active": true, "timeZone": "Europe/London" }, "body": "Simply being able to pass in a content-type in the Ti AudioStreamer constructor would be a great help. I've hacked the AudioStreamer to recognise an AAC extension so it will trigger kAudioFileAAC_ADTSType, but as there area fair number of different url schemes out there, and given that the content-type (in my case) is known, it's cleaner to pass it in the Ti constructor. Unfortunately my Objective-C skills are minimal and I have to lie down in a dark room after even the simplest hack.\r\n\r\nSo my addition to the original feature requests (of several years ago) would be a content-type property.", "updateAuthor": { "name": "patrickmounteney", "key": "patrickmounteney", "displayName": "Patrick Mounteney", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-03T18:27:09.000+0000", "updated": "2016-02-03T18:27:09.000+0000" }, { "id": "433125", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Considered to be added as part of TIMOB-24909.\r\n\r\n*EDIT*:\r\n- (Already available) ADD duration read-only property\r\n- (Already available) ADD time property (for seeking)\r\n- (Already available) ADD volume property\r\n- (Added in the linked ticket, used via {{seekToTime}}) ADD next/prev and seeking remote control events\r\n- (Fixed as part of using AVPlayer) FIX play/pause remote controls don't work when using background audio\r\n- (Fixed) FIX changing the URL doesn't work (unless you stop first)\r\n- (Fixed) FIX progress events only fire for the first URL", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-01-13T20:47:34.000+0000", "updated": "2018-01-15T07:59:01.000+0000" }, { "id": "439974", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as a duplicate. If this is in error, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:41:06.000+0000", "updated": "2018-08-06T17:41:06.000+0000" } ], "maxResults": 19, "total": 19, "startAt": 0 } } }