Minor improvements to Mediaplayer
This commit is contained in:
parent
68385f848f
commit
12e957b6df
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue