From 78ef91b6526aa6fa2001f9a7f288c583c18cfed7 Mon Sep 17 00:00:00 2001 From: Armands Malejevs Date: Thu, 12 May 2022 15:39:04 +0300 Subject: [PATCH 1/4] Update readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80577e2a..eb0b7fa1 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,7 @@ var styles = StyleSheet.create({ * [automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) * [backBufferDurationMs](#backBufferDurationMs) * [bufferConfig](#bufferconfig) +* [contentStartTime](#contentStartTime) * [controls](#controls) * [currentPlaybackTime](#currentPlaybackTime) * [disableFocus](#disableFocus) @@ -412,11 +413,14 @@ Platforms: Android ExoPlayer, iOS #### controls Determines whether to show player controls. -* ** false (default)** - Don't show player controls +* **false (default)** - Don't show player controls * **true** - Show player controls Note on iOS, controls are always shown when in fullscreen mode. +### contentStartTime +The start time in ms for SSAI content. This determines at what time to load the video info like resolutions. Use this only when you have SSAI stream where ads resolution is not the same as content resolution. + For Android MediaPlayer, you will need to build your own controls or use a package like [react-native-video-controls](https://github.com/itsnubix/react-native-video-controls) or [react-native-video-player](https://github.com/cornedor/react-native-video-player). Note on Android ExoPlayer, native controls are available by default. If needed, you can also add your controls or use a package like [react-native-video-controls]. From da1d3bb6c30c6c8f438b111ec1724bb077c21a45 Mon Sep 17 00:00:00 2001 From: Armands Malejevs Date: Tue, 24 May 2022 10:36:49 +0300 Subject: [PATCH 2/4] Retru on session exceptions --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 5b770d9c..473f1d50 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1315,7 +1315,8 @@ class ReactExoplayerView extends FrameLayout implements } else if(cause instanceof MediaDrmCallbackException || cause instanceof DrmSessionException) { errorCode = "3005"; errorString = getResources().getString(R.string.unrecognized_media_format); - if (!hasDrmFailed) { + // DrmSessionExceptions can be caused by a lot internal reasons for failure, in most cases they can be safely retried and playback will recover + if (!hasDrmFailed || cause instanceof DrmSessionException) { // When DRM fails to reach the app level certificate server it will fail with a source error so we assume that it is DRM related and try one more time hasDrmFailed = true; playerNeedsSource = true; @@ -1402,7 +1403,6 @@ class ReactExoplayerView extends FrameLayout implements public void setSrc(final Uri uri, final String extension, Map headers) { if (uri != null) { boolean isSourceEqual = uri.equals(srcUri); - hasDrmFailed = false; this.srcUri = uri; this.extension = extension; @@ -1439,7 +1439,6 @@ class ReactExoplayerView extends FrameLayout implements public void setRawSrc(final Uri uri, final String extension) { if (uri != null) { boolean isSourceEqual = uri.equals(srcUri); - this.srcUri = uri; this.extension = extension; this.mediaDataSourceFactory = buildDataSourceFactory(true); From 4c41ae67a1306032de35983aecb3250d2159d1c8 Mon Sep 17 00:00:00 2001 From: Armands Malejevs Date: Mon, 13 Jun 2022 16:03:08 +0300 Subject: [PATCH 3/4] Remove extraneous changes --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index eb0b7fa1..e4631dd7 100644 --- a/README.md +++ b/README.md @@ -278,7 +278,6 @@ var styles = StyleSheet.create({ * [automaticallyWaitsToMinimizeStalling](#automaticallyWaitsToMinimizeStalling) * [backBufferDurationMs](#backBufferDurationMs) * [bufferConfig](#bufferconfig) -* [contentStartTime](#contentStartTime) * [controls](#controls) * [currentPlaybackTime](#currentPlaybackTime) * [disableFocus](#disableFocus) @@ -413,14 +412,10 @@ Platforms: Android ExoPlayer, iOS #### controls Determines whether to show player controls. -* **false (default)** - Don't show player controls * **true** - Show player controls Note on iOS, controls are always shown when in fullscreen mode. -### contentStartTime -The start time in ms for SSAI content. This determines at what time to load the video info like resolutions. Use this only when you have SSAI stream where ads resolution is not the same as content resolution. - For Android MediaPlayer, you will need to build your own controls or use a package like [react-native-video-controls](https://github.com/itsnubix/react-native-video-controls) or [react-native-video-player](https://github.com/cornedor/react-native-video-player). Note on Android ExoPlayer, native controls are available by default. If needed, you can also add your controls or use a package like [react-native-video-controls]. From e07509c1e4cccd5daafb3dcd873b4b0224e4e86a Mon Sep 17 00:00:00 2001 From: Armands Malejevs Date: Mon, 13 Jun 2022 16:03:58 +0300 Subject: [PATCH 4/4] Add accidentally removed readme line --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e4631dd7..80577e2a 100644 --- a/README.md +++ b/README.md @@ -412,6 +412,7 @@ Platforms: Android ExoPlayer, iOS #### controls Determines whether to show player controls. +* ** false (default)** - Don't show player controls * **true** - Show player controls Note on iOS, controls are always shown when in fullscreen mode.