Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/4.4.3 #1652

Merged
merged 31 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
739a636
Fix so background audio from other apps can play when disableFocus is…
Feb 7, 2019
a55b7e5
Added details to readme and changelog
Feb 7, 2019
3d80bfd
Merge branch 'master' into bugfix/android-disablefocus-audio
KurtMakesWeb Mar 15, 2019
4f36eb1
update for androidX
Jun 19, 2019
a96fa33
change minSdkVersion back to 16
Jun 19, 2019
3ddcba3
update readme
Jun 19, 2019
3762a32
remove duplicate ReactVideoPackage()
Jun 20, 2019
976ebcc
add readme to migrating to AndroidX
Jun 20, 2019
e5bc715
add read me
Jun 20, 2019
ed25b3f
fix read me
Jun 21, 2019
a203aea
pre androidX, upgrade to 28
Jun 21, 2019
1cd9796
remove duplicated line in example
Jun 25, 2019
438df8b
change dead code in example
Jun 25, 2019
6de06f1
Remove calls to [super observe] to fix crash
reaperdtme Jul 1, 2019
6876179
Add #1646 to changelog
reaperdtme Jul 2, 2019
4a3ea93
bring back super KVO with selector check
reaperdtme Jul 2, 2019
3d2a58a
Fix memory leak when using AVPlayerViewController, make sure to relea…
jenshandersson Jul 3, 2019
666c26d
Updated changelog
jenshandersson Jul 3, 2019
2b067f1
Merge branch 'master' into bugfix/android-disablefocus-audio
KurtMakesWeb Jul 3, 2019
22a3961
Merge pull request #1646 from kidcosmic/master
CHaNGeTe Jul 4, 2019
7949c55
Merge pull request #1629 from vokhuyetOz/android-28
CHaNGeTe Jul 4, 2019
6c7a0b4
changelog for #1629
Jul 4, 2019
9bc709f
Merge branch 'release/4.4.3' into master
CHaNGeTe Jul 4, 2019
1433d16
Merge pull request #1647 from jenshandersson/master
CHaNGeTe Jul 4, 2019
d4313e2
bump version
Jul 4, 2019
9dec6ae
Merge branch 'release/4.4.3' into bugfix/android-disablefocus-audio
CHaNGeTe Jul 6, 2019
be3c8b6
Merge pull request #1469 from KurtMakesWeb/bugfix/android-disablefocu…
CHaNGeTe Jul 6, 2019
576273d
fix when controls & muted
Jul 6, 2019
61a72ad
update changelog
Jul 6, 2019
eae487c
Merge branch 'release/4.4.3' into feature/fix-when-muted-and-controls
CHaNGeTe Jul 8, 2019
77c9ad3
Merge pull request #1654 from 24i/feature/fix-when-muted-and-controls
CHaNGeTe Jul 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog

### Version 4.4.3
* Fix mute/unmute when controls are present (iOS) [#1654](https://github.com/react-native-community/react-native-video/pull/1654)
* Fix Android videos being able to play with background music/audio from other apps.
* Fixed memory leak on iOS when using `controls` [#1647](https://github.com/react-native-community/react-native-video/pull/1647)
* (Android) Update gradle and target SDK [#1629](https://github.com/react-native-community/react-native-video/pull/1629)
* Fix iOS stressed mount/unmount crash [#1646](https://github.com/react-native-community/react-native-video/pull/1646)

### Version 4.4.2
* Change compileOnly to implementation on gradle (for newer gradle versions and react-native 0.59 support) [#1592](https://github.com/react-native-community/react-native-video/pull/1592)
* Replaced RCTBubblingEventBlock events by RCTDirectEventBlock to avoid event name collisions [#1625](https://github.com/react-native-community/react-native-video/pull/1625)
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ project(':react-native-video').projectDir = new File(rootProject.projectDir, '..
```gradle
dependencies {
...
compile project(':react-native-video')
compile project(':react-native-video')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

}
```

Expand Down Expand Up @@ -370,6 +372,13 @@ For Android MediaPlayer, you will need to build your own controls or use a packa

Platforms: Android ExoPlayer, iOS, react-native-dom

#### disableFocus
Determines whether video audio should override background music/audio in Android devices.
* ** false (default)** - Override background audio/music
* **true** - Let background audio/music from other apps play

Platforms: Android Exoplayer

#### filter
Add video filter
* **FilterType.NONE (default)** - No Filter
Expand Down
12 changes: 6 additions & 6 deletions android-exoplayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ def safeExtGet(prop, fallback) {
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 27)
buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')

compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -15,7 +15,7 @@ android {

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
}
Expand All @@ -28,9 +28,9 @@ dependencies {
}

// All support libs must use the same version
implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '28.0.0')}"
implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '28.0.0')}"
implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '28.0.0')}"

implementation('com.google.android.exoplayer:extension-okhttp:2.9.3') {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ private void releasePlayer() {
}

private boolean requestAudioFocus() {
if (disableFocus) {
if (disableFocus || srcUri == null) {
return true;
}
int result = audioManager.requestAudioFocus(this,
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ def safeExtGet(prop, fallback) {
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 27)
buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
ndk {
Expand Down
21 changes: 13 additions & 8 deletions examples/basic/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.videoplayer"
minSdkVersion 16
targetSdkVersion 25
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
ndk {
Expand All @@ -108,6 +111,7 @@ android {
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
matchingFallbacks = ['release', 'debug']
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
Expand All @@ -127,9 +131,10 @@ android {
}

dependencies {
compile "com.android.support:appcompat-v7:25.2.0"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-video')
implementation project(':react-native-video')
compile "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
// compile project(':react-native-video-exoplayer') // uncomment to use exoplayer
}

Expand Down
2 changes: 1 addition & 1 deletion examples/basic/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
android:targetSdkVersion="28" />

<application
android:name=".MainApplication"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.app.Application;

import com.brentvatne.react.ReactVideoPackage;
import com.facebook.react.ReactApplication;
import com.brentvatne.react.ReactVideoPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand All @@ -24,8 +24,8 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ReactVideoPackage()
);
new ReactVideoPackage()
);
}
};

Expand Down
17 changes: 16 additions & 1 deletion examples/basic/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"

}
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:3.4.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,6 +24,12 @@ buildscript {
allprojects {
repositories {
mavenLocal()
maven {
url 'https://maven.google.com'
}
maven {
url "https://jitpack.io"
}
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
8 changes: 3 additions & 5 deletions examples/basic/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
rootProject.name = 'VideoPlayer'

include ':app',
':react-native-video',
':react-native-video-exoplayer'
include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer')

// Quick Local Development
//project(':react-native-video').projectDir = new File(rootProject.projectDir, '../../android')
//project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../../android-exoplayer')

project(':react-native-video').projectDir = new File(rootProject.projectDir, '../../android')
project(':react-native-video-exoplayer').projectDir = new File(rootProject.projectDir, '../../android-exoplayer')
include ':app'
Loading