new release

This commit is contained in:
Page Asgardius 2023-03-08 11:38:01 -07:00
parent fc3c1c98b0
commit 319019cd46
3 changed files with 13 additions and 8 deletions

View file

@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3manager"
minSdk 21
targetSdk 33
versionCode 78
versionName "0.9.2"
versionCode 79
versionName "0.9.3"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -29,6 +29,7 @@ import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Tracks;
import com.google.android.exoplayer2.audio.AudioAttributes;
import com.google.android.exoplayer2.database.StandaloneDatabaseProvider;
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector;
@ -169,6 +170,7 @@ public class VideoPlayer extends AppCompatActivity {
player.addMediaSource(mediaSource);
}
}
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
player.prepare();
try {
player.seekTo(names.indexOf(title), 0);
@ -210,6 +212,14 @@ public class VideoPlayer extends AppCompatActivity {
}
}
@Override
public void onTracksChanged(Tracks tracks) {
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
Player.Listener.super.onTracksChanged(tracks);
}
});
@ -228,9 +238,6 @@ public class VideoPlayer extends AppCompatActivity {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else if (state == 2) {
// Buffering.
//Acquiring WakeLock and WifiLock if not held
@ -242,9 +249,6 @@ public class VideoPlayer extends AppCompatActivity {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else {
//Player inactive
//Releasing WifiLock and WakeLock if held

View file

@ -0,0 +1 @@
* Fix UI issue at media player screen