Minor improvements to Mediaplayer

This commit is contained in:
daniel oeh 2012-06-12 10:28:19 +02:00
parent 68385f848f
commit 12e957b6df
3 changed files with 5 additions and 4 deletions

View File

@ -153,8 +153,8 @@ public class MediaplayerActivity extends SherlockActivity {
if (media != null) {
MediaPlayer player = playbackService.getPlayer();
getSupportActionBar().setTitle(media.getItem().getTitle());
getSupportActionBar().setSubtitle(
getSupportActionBar().setSubtitle(media.getItem().getTitle());
getSupportActionBar().setTitle(
media.getItem().getFeed().getTitle());
imgvCover.setImageBitmap(

View File

@ -28,7 +28,7 @@ public class FeedMedia extends FeedFile{
this.download_url = download_url;
}
public long getDuration() {
public int getDuration() {
return duration;
}
@ -36,7 +36,7 @@ public class FeedMedia extends FeedFile{
this.duration = duration;
}
public long getPosition() {
public int getPosition() {
return position;
}

View File

@ -129,6 +129,7 @@ public class PlaybackService extends Service {
if (status == PlayerStatus.PAUSED || status == PlayerStatus.PREPARED) {
Log.d(TAG, "Resuming/Starting playback");
player.start();
player.seekTo((int) media.getPosition());
setStatus(PlayerStatus.PLAYING);
setupPositionSaver();
} else if (status == PlayerStatus.STOPPED) {