Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Ti.Media.Audioplayer.setTime() – Best practice to realise seeking remote files

$
0
0

Hi,

I try to seeking with audio player. In every progress event I' saving the position in database. Now I want to seek to last position. In which state of player I should call setTime()? Currently I call it in 'playining' state. It works , but time to time after restarting the player jump in 'playing' state, but a progress stater never comes and the player keeps muted.

case 'playing':
    // UI work:
    that._subtitle.ellipsize = Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MARQUEE;
    that._spinner.hide();
    that._control.image = '/images/pause.png';
    // getting last time
    that.progress = that._Recents.getProgress(that.url) ;
    // setting it:
    that._player.setTime(that.progress* 1000);
    break;
}
How can I solve?

Cheers!

Konrad


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>