Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15675] Android: Setting the position of the audio playBack in audioPlayer

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-01-17T00:27:56.000+0000
Affected Version/sRelease 3.1.3
Fix Version/s2014 Sprint 01, 2014 Sprint 01 API, Release 3.3.0
ComponentsAndroid
Labelsmodule_media, qe-testadded
ReporterBetty Tran
AssigneeSunila
Created2013-11-06T15:46:52.000+0000
Updated2014-04-22T23:06:16.000+0000

Description

Description

Ability to set the position of the media playback to start the media from the middle instead of from start.

Comments

  1. Sunila 2013-11-19

    Looks like Android version already has a method 'setTime' to set the position but this is not documented.
  2. Sunila 2013-12-14

    Exposed 'time' property like in sound. https://github.com/appcelerator/titanium_mobile/pull/5121
  3. Sunila 2014-01-09

    Test case var win = Ti.UI.createWindow({ layout: 'vertical', backgroundColor : "#FFF" }); var audioPlayer = Titanium.Media.createAudioPlayer({ allowBackground : true }); var button = Ti.UI.createButton({ title : 'Stop', width : 200 }); button.addEventListener('click', function() { audioPlayer.stop(); audioPlayer.release(); }); win.add(button); var button2 = Ti.UI.createButton({ title : 'Play', width : 200 }); button2.addEventListener('click', function() { audioPlayer.start(); }); win.add(button2); var button3 = Ti.UI.createButton({ title : 'Pause', width : 200 }); button3.addEventListener('click', function() { audioPlayer.pause(); }); win.add(button3); var button4 = Ti.UI.createButton({ title : 'getTime', width : 200 }); button4.addEventListener('click', function() { Ti.API.info("Time = " +audioPlayer.getTime()); }); win.add(button4); var button5 = Ti.UI.createButton({ title : 'setTime', width : 200 }); button5.addEventListener('click', function() { audioPlayer.setTime(audioPlayer.getTime()+18000); }); win.add(button5); audioPlayer.setUrl('Kalimba.mp3'); audioPlayer.start(); win.open();

JSON Source