release 1.1.0-a

This commit is contained in:
Thomas 2020-09-19 18:19:59 +02:00
parent 0a7fab6883
commit eef6b3d76c
3 changed files with 15 additions and 4 deletions

View File

@ -10,8 +10,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 8 versionCode 9
versionName "1.1.0" versionName "1.1.0-a"
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -107,6 +107,7 @@ dependencies {
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'com.github.GrenderG:Toasty:1.4.2' implementation 'com.github.GrenderG:Toasty:1.4.2'
implementation 'com.google.android.exoplayer:exoplayer:2.10.6' implementation 'com.google.android.exoplayer:exoplayer:2.10.6'
implementation 'com.google.android.exoplayer:extension-mediasession:2.10.6'
implementation "com.github.mabbas007:TagsEditText:1.0.5" implementation "com.github.mabbas007:TagsEditText:1.0.5"
implementation "com.github.bumptech.glide:glide:4.11.0" implementation "com.github.bumptech.glide:glide:4.11.0"
annotationProcessor "com.github.bumptech.glide:compiler:4.11.0" annotationProcessor "com.github.bumptech.glide:compiler:4.11.0"
@ -114,5 +115,6 @@ dependencies {
implementation "net.gotev:uploadservice:3.5.2" implementation "net.gotev:uploadservice:3.5.2"
implementation "net.gotev:uploadservice-okhttp:3.5.2" implementation "net.gotev:uploadservice-okhttp:3.5.2"
implementation "com.google.code.gson:gson:2.8.6" implementation "com.google.code.gson:gson:2.8.6"
implementation 'androidx.media:media:1.2.0'
} }

View File

@ -41,12 +41,14 @@
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTask" android:launchMode="singleTask"
android:resizeableActivity="true"
android:supportsPictureInPicture="true" android:supportsPictureInPicture="true"
tools:targetApi="n" /> tools:targetApi="n" />
<activity <activity
android:name=".PeertubeEditUploadActivity" android:name=".PeertubeEditUploadActivity"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:exported="false"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<activity <activity

View File

@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.media.session.MediaSessionCompat;
import android.text.Html; import android.text.Html;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -61,6 +62,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.ExoPlayerFactory; import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.SimpleExoPlayer; import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector;
import com.google.android.exoplayer2.source.ProgressiveMediaSource; import com.google.android.exoplayer2.source.ProgressiveMediaSource;
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout; import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
import com.google.android.exoplayer2.ui.PlayerControlView; import com.google.android.exoplayer2.ui.PlayerControlView;
@ -732,7 +734,12 @@ public class PeertubeActivity extends AppCompatActivity {
} }
private void enterVideoMode() { private void enterVideoMode() {
if (playInMinimized && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (playInMinimized && Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && player != null && player.isPlaying()) {
MediaSessionCompat mediaSession = new MediaSessionCompat(this, getPackageName());
MediaSessionConnector mediaSessionConnector = new MediaSessionConnector(mediaSession);
mediaSessionConnector.setPlayer(player);
playerView.setControllerAutoShow(false);
mediaSession.setActive(true);
enterPictureInPictureMode(); enterPictureInPictureMode();
} }
} }
@ -740,7 +747,7 @@ public class PeertubeActivity extends AppCompatActivity {
@Override @Override
public void onBackPressed() { public void onBackPressed() {
if (playInMinimized) { if (playInMinimized && player != null && player.isPlaying()) {
enterVideoMode(); enterVideoMode();
} else { } else {
super.onBackPressed(); super.onBackPressed();