[TIMOB-13704] Android: Add setTime() method to allow playback from arbitrary locations in a stream
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-07-28T21:43:59.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | 2013 Sprint 15 API, 2013 Sprint 15, Release 3.2.0 |
Components | Android |
Labels | android, audiploayer, exalture, module_media, qe-testadded |
Reporter | Sheran Gunasekera |
Assignee | Biju pm |
Created | 2013-04-27T07:23:42.000+0000 |
Updated | 2013-10-29T03:09:35.000+0000 |
Description
In order for an audio stream to be played back from an arbitrary location within the stream, a setTime() method would be beneficial. Usage would be like this:
function doClick(e) {
audioPlayer.url = "http://domain/to/mp3_file.mp3";
audioPlayer.setTime(55000); // Playback from the 55th second
audioPlayer.start();
}
Made a Pull Request for this: https://github.com/sheran/titanium_mobile/commit/2f7b2f253e95a76615ac9416beeebd0a86ecf836 I've tested on OS X 10.8.3 and works well. Would appreciate anyone else that is willing to test.
Added time property to AudioPlayer. https://github.com/appcelerator/titanium_mobile/pull/4331
master PR: https://github.com/appcelerator/titanium_mobile/pull/4219
Verified fix on: Device : HTC desire V , Android version : 4.0.3 SDK: 3.2.0.v20131008154043 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310092427 XCode : 5
Does the setTime work when playing local mp3 files?
Yes, it works for local files as well