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

Merge from master #3

Merged
merged 54 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8a8f215
chang maven to google
Jul 6, 2019
47e1630
remove rnpm
Jul 10, 2019
6bdbaec
4.4.4
Jul 12, 2019
95060d7
Update README.md
CHaNGeTe Jul 23, 2019
66a85ae
Update README.md
CHaNGeTe Jul 23, 2019
62ff44a
Update README.md
CHaNGeTe Jul 23, 2019
d748d17
Update MainApplication.java
CHaNGeTe Jul 23, 2019
222adf5
remove matchingfallbacks in example
Jul 24, 2019
a45e857
Merge branch 'release/5.0.0' into update-androidx
CHaNGeTe Jul 25, 2019
1fb07b5
Merge pull request #1626 from vokhuyetOz/update-androidx
CHaNGeTe Jul 25, 2019
917f9cb
prepare 5.0.0 version
Jul 25, 2019
c29244b
Merge pull request #1683 from react-native-community/release/5.0.0
CHaNGeTe Jul 25, 2019
88d3a4a
cpck androidx
Jul 28, 2019
6bd8f33
change minSdkVersion back to 16
Jun 19, 2019
45b806d
update readme
Jun 19, 2019
991fd59
add readme to migrating to AndroidX
Jun 20, 2019
e6e57ec
cpck readme
Jun 20, 2019
2f8746c
fix read me
Jun 21, 2019
a1679ef
chang maven to google
Jul 6, 2019
4f9f793
cpck
CHaNGeTe Jul 23, 2019
e38149b
ad platform installation to TOC
Jul 23, 2019
aad75d4
More update info
Jul 25, 2019
c38ff02
5.0.1
Jul 28, 2019
3012b81
Fixed Exoplayer doesn't work with mute=true #1696
andrewchae Aug 1, 2019
2b9ddda
Updated README.md to include instructions for React Native 0.60 and a…
jhalvorson Aug 17, 2019
7a9081d
Removing the call to observeValueForKeyPath:ofObject:change:context: …
Aug 20, 2019
923bc59
Updated CHANGELOG to reflect bug fix in PR 1720
Aug 20, 2019
e3782c4
added support for automaticallyWaitsToMinimizeStalling property on iOS
Aug 22, 2019
0a361d1
update readme
Aug 22, 2019
7615e5d
fix invert boolean property
Aug 22, 2019
4320b56
bumped version & updated changelog
Aug 22, 2019
008f5f0
fix formatting issues
Aug 30, 2019
0cfc732
fix formatting
Aug 30, 2019
d858bf7
Merge pull request #1690 from 24i/feature/androidx-cherry-pick
CHaNGeTe Sep 8, 2019
0a2f7bd
Merge pull request #1715 from jhalvorson/master
CHaNGeTe Sep 8, 2019
9272678
Merge branch 'master' into fix-NSInternalInconsistencyException
CHaNGeTe Sep 8, 2019
f66ca32
Merge pull request #1720 from nmarisi/fix-NSInternalInconsistencyExce…
CHaNGeTe Sep 8, 2019
cfcf6ce
Merge branch 'master' into master
CHaNGeTe Sep 21, 2019
59be8b5
Merge pull request #1723 from blitzcrank/master
CHaNGeTe Sep 21, 2019
b954a4f
Merge pull request #1699 from andrewchae/mute
CHaNGeTe Sep 21, 2019
a86f316
changelog for #1696
Sep 21, 2019
9149346
Update issue templates
CHaNGeTe Sep 21, 2019
c90197b
Update bug_report.md
CHaNGeTe Sep 21, 2019
461209f
Update bug_report.md
CHaNGeTe Sep 21, 2019
ed335f3
Fix indent and respect previous rate
CHaNGeTe Sep 22, 2019
81cfd4e
Bring the basic example back to a runnable state
Sep 16, 2019
3e38f88
Remove Exoplayer deprecations
Sep 16, 2019
3d40deb
Update changelog with Exoplayer update (#1766)
benoitdion Sep 23, 2019
c9a248e
update package json version
Sep 24, 2019
78f1d29
update changelog version
Sep 24, 2019
4a8eea7
Add disableFocus to TOC
CHaNGeTe Sep 25, 2019
040b171
fix typo in README
BaderSerhan Sep 25, 2019
b675e59
Merge pull request #1773 from BaderSerhan/master
CHaNGeTe Sep 29, 2019
b97663e
Clear progress messages on STATE_IDLE and STATE_BUFFERING (#1768)
benoitdion Sep 30, 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
66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

# Bug

<!--
Please provide a clear and concise description of what the bug is.
Include screenshots if needed.
Please test using the latest release of the library, as maybe said bug has been already fixed.
If the library has multiple install methods, describe installation method (e.g., pod, not pod, with jetifier etc)
-->

## Platform
<!--
Platform where your bug is happening. If Android, report if using Android or Android Exoplayer
-->
Which player are you experiencing the problem on:
* iOS
* Android ExoPlayer
* Android MediaPlayer
* Windows UWP
* Windows WPF

## Environment info

<!--
Run `react-native info` in your terminal and copy the results here. Also, include the *precise* version number of this library that you are using in the project
-->

React native info output:

```bash
// paste it here
```

Library version: x.x.x

## Steps To Reproduce

<!--
Issues without reproduction steps or code are likely to stall.
-->

1.
2.
...

## Expected behaviour

1.
2.

## Reproducible sample code

<!--
Please add to your issue a repro, a fresh codebase with the minimal changes so that the bug can be tested in isolation
-->

## Video sample
If possible, include a link to the video that has the problem that can be streamed or downloaded from.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

# Feature Request

<!--
This issue should serve for you to present or pitch an idea to the maintainers - but remember that it would be better if you were to submit a PR instead 🤗
-->

## Why it is needed

<!--
Please tell us a bit more of why you want this feature to be added, what's its origin
-->

## Possible implementation

<!--
It really helps if you could describe from a technical POV how this new feature would work, which code it rely on, etc
-->

### Code sample

<!--
Please show how the new code could work, if doable
-->
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
## Changelog

### next
### Version 5.1.0-alpha1
* Fixed Exoplayer doesn't work with mute=true (Android). [#1696](https://github.com/react-native-community/react-native-video/pull/1696)
* Added support for automaticallyWaitsToMinimizeStalling property (iOS) [#1723](https://github.com/react-native-community/react-native-video/pull/1723)
* Bump Exoplayer to 2.10.4, remove deprecated usages of Exoplayer methods (Android). [#1753](https://github.com/react-native-community/react-native-video/pull/1753)
* Preserve Exoplayer BandwidthMeter instance across video plays, this should noticeably improve streaming bandwidth detection (Android).

### Version 5.0.2
* Fix crash when RCTVideo's superclass doesn't observe the keyPath 'frame' (iOS) [#1720](https://github.com/react-native-community/react-native-video/pull/1720)

### Version 5.0.1
* Fix AndroidX Support bad merge

### Version 5.0.0 [Deprecated]
* AndroidX Support

### Version 4.4.4
* Handle racing conditions when props are setted on exoplayer

### Version 4.4.3
Expand Down
116 changes: 95 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
A `<Video>` component for react-native, as seen in
[react-native-login](https://github.com/brentvatne/react-native-login)!

Version 5.x recommends react-native >= 0.60.0 for Android 64bit builds and Android X support.

Version 4.x requires react-native >= 0.57.0

Version 3.x requires react-native >= 0.40.0

### Version 5.0.0 breaking changes

Version 5 introduces breaking changes on Android, please check carefully the steps described there: [Android Installation](#Android-installation)

### Version 4.0.0 breaking changes
Version 4.0.0 changes some behaviors and may require updates to your Gradle files. See [Updating](#updating) for details.

Expand All @@ -20,6 +26,11 @@ Version 3.0 features a number of changes to existing behavior. See [Updating](#u
## Table of Contents

* [Installation](#installation)
* [iOS](#ios-installation)
* [tvOS](#tvos-installation)
* [Android](#android-installation)
* [Windows](#windows-installation)
* [react-native-dom](#react-native-dom-installation)
* [Usage](#usage)
* [iOS App Transport Security](#ios-app-transport-security)
* [Audio Mixing](#audio-mixing)
Expand All @@ -42,14 +53,21 @@ yarn add react-native-video

Then follow the instructions for your platform to link react-native-video into your project:

### iOS installation
<details>
<summary>iOS</summary>
<summary>iOS details</summary>

#### Standard Method

**React Native 0.60 and above**

### Standard Method
Run `pod install` in the `ios` directory. Linking is not required in React Native 0.60 and above.

**React Native 0.59 and below**

Run `react-native link react-native-video` to link the react-native-video library.

### Using CocoaPods (required to enable caching)
#### Using CocoaPods (required to enable caching)

Setup your Podfile like it is described in the [react-native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies).

Expand All @@ -73,9 +91,10 @@ end

</details>

<details>
<summary>tvOS</summary>

### tvOS installation
<details>
<summary>tvOS details</summary>

`react-native link react-native-video` doesn’t work properly with the tvOS target so we need to add the library manually.

First select your project in Xcode.
Expand All @@ -95,14 +114,15 @@ Select RCTVideo-tvOS
<img src="./docs/tvOS-step-4.jpg" width="40%">
</details>

### Android installation
<details>
<summary>Android</summary>
<summary>Android details</summary>

Run `react-native link react-native-video` to link the react-native-video library.

Or if you have trouble, make the following additions to the given files manually:

**android/settings.gradle**
#### **android/settings.gradle**

The newer ExoPlayer library will work for most people.

Expand All @@ -118,19 +138,30 @@ include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
```

#### **android/app/build.gradle**

**android/app/build.gradle**
From version >= 5.0.0, you have to apply this changes:

```gradle
```diff
dependencies {
...
compile project(':react-native-video')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
+ implementation "androidx.appcompat:appcompat:1.0.0"
- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

}
```

**MainApplication.java**
#### **android/gradle.properties**

Migrating to AndroidX (needs version >= 5.0.0):

```gradle.properties
android.useAndroidX=true
android.enableJetifier=true
```

#### **MainApplication.java**

On top, where imports are:

Expand All @@ -151,12 +182,13 @@ protected List<ReactPackage> getPackages() {
```
</details>

### Windows installation
<details>
<summary>Windows</summary>
<summary>Windows details</summary>

Make the following additions to the given files manually:

**windows/myapp.sln**
#### **windows/myapp.sln**

Add the `ReactNativeVideo` project to your solution.

Expand All @@ -165,15 +197,15 @@ Add the `ReactNativeVideo` project to your solution.
* UWP: Select `node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj`
* WPF: Select `node_modules\react-native-video\windows\ReactNativeVideo.Net46\ReactNativeVideo.Net46.csproj`

**windows/myapp/myapp.csproj**
#### **windows/myapp/myapp.csproj**

Add a reference to `ReactNativeVideo` to your main application project. From Visual Studio 2015:

1. Right-click main application project > Add > Reference...
* UWP: Check `ReactNativeVideo` from Solution Projects.
* WPF: Check `ReactNativeVideo.Net46` from Solution Projects.

**MainPage.cs**
#### **MainPage.cs**

Add the `ReactVideoPackage` class to your list of exported packages.
```cs
Expand All @@ -200,12 +232,13 @@ using System.Collections.Generic;
```
</details>

### react-native-dom installation
<details>
<summary>react-native-dom</summary>
<summary>react-native-dom details</summary>

Make the following additions to the given files manually:

**dom/bootstrap.js**
#### **dom/bootstrap.js**

Import RCTVideoManager and add it to the list of nativeModules:

Expand Down Expand Up @@ -259,8 +292,10 @@ var styles = StyleSheet.create({
### Configurable props
* [allowsExternalPlayback](#allowsexternalplayback)
* [audioOnly](#audioonly)
* [automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling)
* [bufferConfig](#bufferconfig)
* [controls](#controls)
* [disableFocus](#disableFocus)
* [filter](#filter)
* [filterEnabled](#filterEnabled)
* [fullscreen](#fullscreen)
Expand Down Expand Up @@ -337,6 +372,13 @@ For this to work, the poster prop must be set.

Platforms: all

#### automaticallyWaitsToMinimizeStalling
A Boolean value that indicates whether the player should automatically delay playback in order to minimize stalling. For clients linked against iOS 10.0 and later
* **false** - Immediately starts playback
* **true (default)** - Delays playback in order to minimize stalling

Platforms: iOS

#### bufferConfig
Adjust the buffer settings. This prop takes an object with one or more of the properties listed below.

Expand Down Expand Up @@ -1126,7 +1168,7 @@ Save video to your Photos with current filter prop. Returns promise.

Example:
```
let response = await this.save();
let response = await this.player.save();
let path = response.uri;
```

Expand All @@ -1138,12 +1180,12 @@ Notes:
- Works with cached videos as well. (Checkout video-caching example)
- If the video is has not began buffering (e.g. there is no internet connection) then the save function will throw an error.
- If the video is buffering then the save function promise will return after the video has finished buffering and processing.

Future:
- Will support multiple qualities through options
- Will support more formats in the future through options
- Will support custom directory and file name through options

Platforms: iOS

#### restoreUserInterfaceForPictureInPictureStopCompleted
Expand Down Expand Up @@ -1270,6 +1312,38 @@ To enable audio to play in background on iOS the audio session needs to be set t

## Updating

### Version 5.0.0

Probably you want to update your gradle version:
#### gradle-wrapper.properties
```diff
- distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
```

#### **android/app/build.gradle**

From version >= 5.0.0, you have to apply this changes:

```diff
dependencies {
...
compile project(':react-native-video')
+ implementation "androidx.appcompat:appcompat:1.0.0"
- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

}
```

#### **android/gradle.properties**

Migrating to AndroidX (needs version >= 5.0.0):

```gradle.properties
android.useAndroidX=true
android.enableJetifier=true
```

### Version 4.0.0

#### Gradle 3 and target SDK 26 requirement
Expand Down
1 change: 1 addition & 0 deletions Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ Video.propTypes = {
poster: PropTypes.string,
posterResizeMode: Image.propTypes.resizeMode,
repeat: PropTypes.bool,
automaticallyWaitsToMinimizeStalling: PropTypes.bool,
allowsExternalPlayback: PropTypes.bool,
selectedAudioTrack: PropTypes.shape({
type: PropTypes.string.isRequired,
Expand Down
Loading