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) { if (media != null) {
MediaPlayer player = playbackService.getPlayer(); MediaPlayer player = playbackService.getPlayer();
getSupportActionBar().setTitle(media.getItem().getTitle()); getSupportActionBar().setSubtitle(media.getItem().getTitle());
getSupportActionBar().setSubtitle( getSupportActionBar().setTitle(
media.getItem().getFeed().getTitle()); media.getItem().getFeed().getTitle());
imgvCover.setImageBitmap( imgvCover.setImageBitmap(

View File

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

View File

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