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" applicationId "asgardius.page.s3manager"
minSdk 21 minSdk 21
targetSdk 33 targetSdk 33
versionCode 78 versionCode 79
versionName "0.9.2" versionName "0.9.3"
setProperty("archivesBaseName", "s3-manager-$versionName") setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 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.MediaItem;
import com.google.android.exoplayer2.PlaybackException; import com.google.android.exoplayer2.PlaybackException;
import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Tracks;
import com.google.android.exoplayer2.audio.AudioAttributes; import com.google.android.exoplayer2.audio.AudioAttributes;
import com.google.android.exoplayer2.database.StandaloneDatabaseProvider; import com.google.android.exoplayer2.database.StandaloneDatabaseProvider;
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector; import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector;
@ -169,6 +170,7 @@ public class VideoPlayer extends AppCompatActivity {
player.addMediaSource(mediaSource); player.addMediaSource(mediaSource);
} }
} }
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
player.prepare(); player.prepare();
try { try {
player.seekTo(names.indexOf(title), 0); 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(); mWakeLock.acquire();
//System.out.println("WakeLock acquired"); //System.out.println("WakeLock acquired");
} }
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else if (state == 2) { } else if (state == 2) {
// Buffering. // Buffering.
//Acquiring WakeLock and WifiLock if not held //Acquiring WakeLock and WifiLock if not held
@ -242,9 +249,6 @@ public class VideoPlayer extends AppCompatActivity {
mWakeLock.acquire(); mWakeLock.acquire();
//System.out.println("WakeLock acquired"); //System.out.println("WakeLock acquired");
} }
if(isplaylist) {
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
}
} else { } else {
//Player inactive //Player inactive
//Releasing WifiLock and WakeLock if held //Releasing WifiLock and WakeLock if held

View file

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