From 33d9acdf5de831198f3a36202a6e8bbc565da260 Mon Sep 17 00:00:00 2001 From: Matthew Herz Date: Thu, 6 Sep 2018 12:56:36 -0700 Subject: [PATCH 1/6] Fix missing TargetApi import The build was producing a "cannot find symbol class TargetApi" error without that line. --- android/src/main/java/com/brentvatne/react/ReactVideoView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/brentvatne/react/ReactVideoView.java b/android/src/main/java/com/brentvatne/react/ReactVideoView.java index b7c2eec5..3ff17a1f 100644 --- a/android/src/main/java/com/brentvatne/react/ReactVideoView.java +++ b/android/src/main/java/com/brentvatne/react/ReactVideoView.java @@ -1,6 +1,7 @@ package com.brentvatne.react; import android.annotation.SuppressLint; +import android.annotation.TargetApi; import android.app.Activity; import android.content.res.AssetFileDescriptor; import android.graphics.Matrix; From bbacb953458fffc38cba846d1e5b27e3066e78f1 Mon Sep 17 00:00:00 2001 From: David Narbutovich Date: Wed, 12 Sep 2018 11:27:36 +0300 Subject: [PATCH 2/6] Update TextTrackType.js Remove not needed import --- TextTrackType.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/TextTrackType.js b/TextTrackType.js index caff65a9..9dc14077 100644 --- a/TextTrackType.js +++ b/TextTrackType.js @@ -1,5 +1,3 @@ -import keyMirror from 'keymirror'; - export default { SRT: 'application/x-subrip', TTML: 'application/ttml+xml', From 5e360608af485bdec2ddaf61b782e4c5a76d63c5 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Wed, 12 Sep 2018 19:38:11 -0700 Subject: [PATCH 3/6] Return unset track index when there are no track available (#1190) --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index e098c72a..0c1a178f 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -830,6 +830,10 @@ class ReactExoplayerView extends FrameLayout implements } private int getTrackIndexForDefaultLocale(TrackGroupArray groups) { + if (groups.length == 0) { // Avoid a crash if we try to select a non-existant group + return C.INDEX_UNSET; + } + int trackIndex = 0; // default if no match String locale2 = Locale.getDefault().getLanguage(); // 2 letter code String locale3 = Locale.getDefault().getISO3Language(); // 3 letter code From b0c0ac10f437a40b4d7d6184d21cdbbdea2886ed Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Wed, 12 Sep 2018 19:42:11 -0700 Subject: [PATCH 4/6] Avoid crash on ExoPlayer when there are no tracks to choose from --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac26914..2bc5b674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Support video caching for iOS [#955](https://github.com/react-native-community/react-native-video/pull/955) * Video caching cleanups [#1172](https://github.com/react-native-community/react-native-video/pull/1172) * Add ipod-library support [#926](https://github.com/react-native-community/react-native-video/pull/926/files) +* Fix crash on ExoPlayer when there are no audio tracks [#1233](https://github.com/react-native-community/react-native-video/pull/1233) ### Version 3.2.0 * Basic fullscreen support for Android MediaPlayer [#1138](https://github.com/react-native-community/react-native-video/pull/1138) From ea4c732c9593e5db24b1d46d6284a7977d5001f7 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Sat, 22 Sep 2018 15:01:51 -0700 Subject: [PATCH 5/6] Reduce package size --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc5b674..60460e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ * Video caching cleanups [#1172](https://github.com/react-native-community/react-native-video/pull/1172) * Add ipod-library support [#926](https://github.com/react-native-community/react-native-video/pull/926/files) * Fix crash on ExoPlayer when there are no audio tracks [#1233](https://github.com/react-native-community/react-native-video/pull/1233) +* Reduce package size [#1231](https://github.com/react-native-community/react-native-video/pull/1231) +* Remove unnecessary import in TextTrackType [#1229](https://github.com/react-native-community/react-native-video/pull/1229) ### Version 3.2.0 * Basic fullscreen support for Android MediaPlayer [#1138](https://github.com/react-native-community/react-native-video/pull/1138) From 584559ea7599e90eb294020c2db888f11fe2fde1 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Sat, 22 Sep 2018 15:03:22 -0700 Subject: [PATCH 6/6] Bump version to 3.2.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3051b567..13e79075 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-video", - "version": "3.2.0", + "version": "3.2.1", "description": "A