release 1.1.0-a
This commit is contained in:
parent
0a7fab6883
commit
eef6b3d76c
|
@ -10,8 +10,8 @@ android {
|
|||
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 8
|
||||
versionName "1.1.0"
|
||||
versionCode 9
|
||||
versionName "1.1.0-a"
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ dependencies {
|
|||
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
||||
implementation 'com.github.GrenderG:Toasty:1.4.2'
|
||||
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.bumptech.glide:glide: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-okhttp:3.5.2"
|
||||
implementation "com.google.code.gson:gson:2.8.6"
|
||||
implementation 'androidx.media:media:1.2.0'
|
||||
|
||||
}
|
|
@ -41,12 +41,14 @@
|
|||
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:resizeableActivity="true"
|
||||
android:supportsPictureInPicture="true"
|
||||
tools:targetApi="n" />
|
||||
<activity
|
||||
android:name=".PeertubeEditUploadActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="stateAlwaysHidden" />
|
||||
|
||||
<activity
|
||||
|
|
|
@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable;
|
|||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.media.session.MediaSessionCompat;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -61,6 +62,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
|
||||
import com.google.android.exoplayer2.ExoPlayerFactory;
|
||||
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.ui.AspectRatioFrameLayout;
|
||||
import com.google.android.exoplayer2.ui.PlayerControlView;
|
||||
|
@ -732,7 +734,12 @@ public class PeertubeActivity extends AppCompatActivity {
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
@ -740,7 +747,7 @@ public class PeertubeActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (playInMinimized) {
|
||||
if (playInMinimized && player != null && player.isPlaying()) {
|
||||
enterVideoMode();
|
||||
} else {
|
||||
super.onBackPressed();
|
||||
|
|
Loading…
Reference in New Issue