[TIMOB-10212] AudioPlayer lacks duration function
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-04-03T20:02:12.000+0000 |
Affected Version/s | Release 2.1.0, Release 3.1.2 |
Fix Version/s | 2014 Sprint 07, 2014 Sprint 07 SDK, Release 3.3.0 |
Components | iOS |
Labels | community, module_media, qe-testadded |
Reporter | Yue Ming Wang |
Assignee | Pedro Enrique |
Created | 2012-07-20T23:30:56.000+0000 |
Updated | 2014-07-01T03:56:56.000+0000 |
Description
AudioPlayer lacks duration function.
Attachments
File | Date | Size |
---|---|---|
4fa7ea4a3a111f50b8c4a84e19d5ca26.png | 2012-07-26T19:17:06.000+0000 | 162513 |
Hi, What is the functionality that you are trying to implement? Can you not have a counter in the Javascript code itself to get the duration of the audio player? Thanks, Varun
A customized radio player which implements online stream playing and could display the the total time length, also known as duration, and the progress.
I need to get the duration just in the beginning rather than the end of playing with a counter in js.
Affects: Release 3.1.1GA iOS +1 For this. Getting the full duration at the start of a track is a critical feature in any streaming application. A pull-request was put in a while ago for this with a bunch of other additional features for the audioplayer; I've manually merged and tested these which work fine so its definitely feasible to implement this with little additional work. As a developer its frustrating having to manually fork and then update/re-fork just because what should be minor features are missing from the sdk.
[~scleaver] Do you have a link to that PR? I seem to be unable to find the one you are referring to.
Sure, it was https://github.com/appcelerator/titanium_mobile/pull/86 It's quite a mess which I guess is why it was never pulled in; took a couple of hours to do the manual merge (going through the diffs and picking out the right/relevant changes). If it would expedite this feature I can re-fork off the latest master and apply the changes and submit a clean pull request?
[~scleaver] Yes, that would be most appreciated. I think one issue is that gerry3 doesn't appear to have signed the CLA, so I don't believe we can legally accept his code without it, even if you clean it up. Let me see if I can get him to do so. You'll need to sign the CLA as well: https://appcelerator.echosign.com/public/hostedForm?formid=25LBTXJ55452R
I've just submitted my signed CLA, if you could post back when/if gerry3 gives a response that'd be great.
[~scleaver] gerry3 signed the CLA, so we should be all set.
Great to hear, I'll look to fork off master branch over the weekend and perform the integration again. I don't expect there to be any issues but will report back on progress (and certainly when I put in a PR).
[~ingo] Have created a PR for the change: https://github.com/appcelerator/titanium_mobile/pull/4427 have also created parity PR for Android at https://github.com/appcelerator/titanium_mobile/pull/4428. Both only required minor changes so should be relatively low risk. With these additions, seeking a track is also now possible which, in my opinion, is also a core feature of an audio player application. gerry3 implemented this in his previous mammoth PR and I've separately implemented this feature on Android before, should I open a separate JIRA for this with a view to submitting a PR for this?
[~scleaver] That's great. Thanks! Would you mind adding a small test case so we know how to test the functionality works? See [Creating a test case](http://docs.appcelerator.com/titanium/latest/#!/guide/How_to_Submit_a_Bug_Report-section-29004732_HowtoSubmitaBugReport-CreatingaTestCase). As to the second functionality, yes, a separate JIRA is preferred.
[~ingo] Sorry for the delay, will try and get the test cases done by the end of this week (for iOS and Android respectively).
[~scleaver] any progress on the test cases?
I'm also anxiously waiting for this one to be resolved, would save me a lot of trouble and hassle trying to find an alternative method... :)
[~btran] Apologies for the delay, combination of travelling/new job. I've been trying to get this done for the past few days but came up against numerous Titanium Studio issues which resulted in me having to fully reinstall everything (I suspect something went wrong with Nodejs somewhere). Even now I'm being plagued by a mysterious "Waiting for SD card to become available..." when trying to run Android which means waiting 60 seconds for it to timeout (after which it runs fine) so obviously thats slowing things also.
Sam Cleaver I am really looking for these features to be added to Titanium - I am willing to help out where I can. Thanks for the great work!
[~btran] [~ingo] I've added an additional commit to my iOS pull request to tidy things up (fix some deprecation, parity issues). Seems you can't add attachments in comments so I've created a gist for the test case at: https://gist.github.com/samcleaver/6720370 The same test case should work with iOS and Android but obviously you'll need to merge the commits in either off the Android or iOS branches I created in the respective pull requests. I've tested on both iOS 6 and Android 4.3.
Ingo Muschenetz - Now that it is marked as fixed in Release 3.3.0 - How would we go about adding this to our Titanium SDK? Should we wait for the official 3.3.0 release (When is this planned?) Should we use the nightly builds? Or is there a better way? Thanks for all the amazing work!
[~dieskim] Just a note--it's not fixed yet. It's scheduled _to be fixed_ in 3.3.0.
Please get this fixed; we are desperately needing these critical features. Thanks for the hard work!
The audioPlayer duration is shown. Verified on: Appc Studio: 3.3.0.201404211130 SDK build: 3.3.0.v20140422163054 alloy: 1.4.0-dev CLI: titanium-3.3.0-dev titanium-code-processor:1.1.1-beta1 Xcode: 5.1.1 Osx: 10.9.2 Device: Nexus 5 (4.4.2), iPhone4 (7.1)
I don't see this in the release candidate. Please tell us it is.