forked from Ivasoft/mattermost-mobile
* module dependencies * update fastlane * upgrade types dependencies * update dev deps * update react-native-notifications * update react-native-keychain * update sentry * update detox * Upgrade to RN 69.3 * increase MaxMetaspaceSize gradle opts * feedback review
137 lines
6.9 KiB
Diff
137 lines
6.9 KiB
Diff
diff --git a/node_modules/react-native-video/Video.js b/node_modules/react-native-video/Video.js
|
|
index b492d48..5f517e9 100644
|
|
--- a/node_modules/react-native-video/Video.js
|
|
+++ b/node_modules/react-native-video/Video.js
|
|
@@ -1,6 +1,7 @@
|
|
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
-import { StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image, Platform, findNodeHandle } from 'react-native';
|
|
+import { StyleSheet, requireNativeComponent, NativeModules, View, Image, Platform, findNodeHandle } from 'react-native';
|
|
+import { ViewPropTypes, ImagePropTypes } from 'deprecated-react-native-prop-types'
|
|
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
|
|
import TextTrackType from './TextTrackType';
|
|
import FilterType from './FilterType';
|
|
@@ -415,7 +416,7 @@ Video.propTypes = {
|
|
maxBitRate: PropTypes.number,
|
|
resizeMode: PropTypes.string,
|
|
poster: PropTypes.string,
|
|
- posterResizeMode: Image.propTypes.resizeMode,
|
|
+ posterResizeMode: ImagePropTypes.resizeMode,
|
|
repeat: PropTypes.bool,
|
|
automaticallyWaitsToMinimizeStalling: PropTypes.bool,
|
|
allowsExternalPlayback: PropTypes.bool,
|
|
diff --git a/node_modules/react-native-video/android-exoplayer/build.gradle b/node_modules/react-native-video/android-exoplayer/build.gradle
|
|
index d005a58..6a9922b 100644
|
|
--- a/node_modules/react-native-video/android-exoplayer/build.gradle
|
|
+++ b/node_modules/react-native-video/android-exoplayer/build.gradle
|
|
@@ -28,7 +28,7 @@ android {
|
|
|
|
dependencies {
|
|
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
|
|
- implementation('com.google.android.exoplayer:exoplayer:2.13.2') {
|
|
+ implementation('com.google.android.exoplayer:exoplayer:2.13.3') {
|
|
exclude group: 'com.android.support'
|
|
}
|
|
|
|
@@ -37,7 +37,7 @@ dependencies {
|
|
implementation "androidx.core:core:1.1.0"
|
|
implementation "androidx.media:media:1.1.0"
|
|
|
|
- implementation('com.google.android.exoplayer:extension-okhttp:2.13.2') {
|
|
+ implementation('com.google.android.exoplayer:extension-okhttp:2.13.3') {
|
|
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
|
}
|
|
implementation 'com.squareup.okhttp3:okhttp:${OKHTTP_VERSION}'
|
|
diff --git a/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
|
|
index fe95fdf..e38b9a9 100644
|
|
--- a/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
|
|
+++ b/node_modules/react-native-video/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
|
|
@@ -3,6 +3,7 @@ package com.brentvatne.exoplayer;
|
|
import android.annotation.SuppressLint;
|
|
import android.app.Activity;
|
|
import android.content.Context;
|
|
+import android.graphics.Color;
|
|
import android.media.AudioManager;
|
|
import android.net.Uri;
|
|
import android.os.Handler;
|
|
@@ -14,6 +15,7 @@ import android.view.Window;
|
|
import android.view.accessibility.CaptioningManager;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.ImageButton;
|
|
+import android.widget.ImageView;
|
|
|
|
import com.brentvatne.react.R;
|
|
import com.brentvatne.receiver.AudioBecomingNoisyReceiver;
|
|
@@ -317,6 +319,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|
playerControlView.setPlayer(player);
|
|
playerControlView.show();
|
|
playPauseControlContainer = playerControlView.findViewById(R.id.exo_play_pause_container);
|
|
+ playerControlView.findViewById(R.id.exo_fullscreen_button).setOnClickListener(v -> setFullscreen(!isFullscreen));
|
|
|
|
// Invoking onClick event for exoplayerView
|
|
exoPlayerView.setOnClickListener(new OnClickListener() {
|
|
@@ -736,6 +739,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|
@Override
|
|
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
|
|
String text = "onStateChanged: playWhenReady=" + playWhenReady + ", playbackState=";
|
|
+ eventEmitter.playbackRateChange(playWhenReady && playbackState == com.google.android.exoplayer2.ExoPlayer.STATE_READY ? 1.0f : 0.0f);
|
|
switch (playbackState) {
|
|
case Player.STATE_IDLE:
|
|
text += "idle";
|
|
@@ -1305,6 +1309,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|
Window window = activity.getWindow();
|
|
View decorView = window.getDecorView();
|
|
int uiOptions;
|
|
+ ImageView fullscreenButton = playerControlView.findViewById(R.id.exo_fullscreen_icon);
|
|
if (isFullscreen) {
|
|
if (Util.SDK_INT >= 19) { // 4.4+
|
|
uiOptions = SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
|
@@ -1316,10 +1321,13 @@ class ReactExoplayerView extends FrameLayout implements
|
|
}
|
|
eventEmitter.fullscreenWillPresent();
|
|
decorView.setSystemUiVisibility(uiOptions);
|
|
+ decorView.setBackgroundColor(Color.parseColor("#000000"));
|
|
+ fullscreenButton.setImageResource(R.drawable.exo_controls_fullscreen_exit);
|
|
eventEmitter.fullscreenDidPresent();
|
|
} else {
|
|
uiOptions = View.SYSTEM_UI_FLAG_VISIBLE;
|
|
eventEmitter.fullscreenWillDismiss();
|
|
+ fullscreenButton.setImageResource(R.drawable.exo_controls_fullscreen_enter);
|
|
decorView.setSystemUiVisibility(uiOptions);
|
|
eventEmitter.fullscreenDidDismiss();
|
|
}
|
|
diff --git a/node_modules/react-native-video/android-exoplayer/src/main/res/layout/exo_player_control_view.xml b/node_modules/react-native-video/android-exoplayer/src/main/res/layout/exo_player_control_view.xml
|
|
index becee6a..96cbfc9 100644
|
|
--- a/node_modules/react-native-video/android-exoplayer/src/main/res/layout/exo_player_control_view.xml
|
|
+++ b/node_modules/react-native-video/android-exoplayer/src/main/res/layout/exo_player_control_view.xml
|
|
@@ -1,5 +1,6 @@
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
@@ -71,6 +72,22 @@
|
|
android:paddingRight="4dp"
|
|
android:includeFontPadding="false"
|
|
android:textColor="#FFBEBEBE"/>
|
|
+ <FrameLayout
|
|
+ android:id="@+id/exo_fullscreen_button"
|
|
+ android:layout_width="32dp"
|
|
+ android:layout_height="wrap_content"
|
|
+ android:layout_gravity="right">
|
|
+
|
|
+ <ImageView
|
|
+ android:id="@+id/exo_fullscreen_icon"
|
|
+ android:layout_width="32dp"
|
|
+ android:layout_height="32dp"
|
|
+ android:layout_gravity="center"
|
|
+ android:adjustViewBounds="true"
|
|
+ android:scaleType="fitCenter"
|
|
+ app:srcCompat="@drawable/exo_controls_fullscreen_enter" />
|
|
+
|
|
+ </FrameLayout>
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|