From 285e9ca8817ff7de4f6ac2d4cf51f944ef5237c9 Mon Sep 17 00:00:00 2001 From: virgil Date: Fri, 15 Apr 2022 17:29:56 +0800 Subject: [PATCH 01/18] =?UTF-8?q?fix:=20=F0=9F=90=9B=20support=20ios=20cam?= =?UTF-8?q?eraroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Video.js | 2 +- ios/Video/RCTVideo.m | 64 ++++++++++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/Video.js b/Video.js index b492d48b..6af4fc3a 100644 --- a/Video.js +++ b/Video.js @@ -275,7 +275,7 @@ export default class Video extends Component { } const isNetwork = !!(uri && uri.match(/^https?:/)); - const isAsset = !!(uri && uri.match(/^(assets-library|ipod-library|file|content|ms-appx|ms-appdata):/)); + const isAsset = !!(uri && uri.match(/^(assets-library|ph|ipod-library|file|content|ms-appx|ms-appdata):/)); let nativeResizeMode; const RCTVideoInstance = this.getViewManagerConfig('RCTVideo'); diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index a757c08a..f2255007 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -5,6 +5,7 @@ #import #include #include +#import static NSString *const statusKeyPath = @"status"; static NSString *const playbackLikelyToKeepUpKeyPath = @"playbackLikelyToKeepUp"; @@ -492,22 +493,22 @@ static int const RCTVideoUnset = -1; handler([AVPlayerItem playerItemWithAsset:mixComposition]); } -- (void)playerItemForSource:(NSDictionary *)source withCallback:(void(^)(AVPlayerItem *))handler -{ +- (void)loadAssetFromSource:(NSDictionary *)source withCallback:(void(^)(AVURLAsset *asset, NSMutableDictionary *assetOptions)) handler { bool isNetwork = [RCTConvert BOOL:[source objectForKey:@"isNetwork"]]; bool isAsset = [RCTConvert BOOL:[source objectForKey:@"isAsset"]]; bool shouldCache = [RCTConvert BOOL:[source objectForKey:@"shouldCache"]]; + NSString *uri = [source objectForKey:@"uri"]; NSString *type = [source objectForKey:@"type"]; - AVURLAsset *asset; + if (!uri || [uri isEqualToString:@""]) { DebugLog(@"Could not find video URL in source '%@'", source); return; } NSURL *url = isNetwork || isAsset - ? [NSURL URLWithString:uri] - : [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]]; + ? [NSURL URLWithString:uri] + : [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]]; NSMutableDictionary *assetOptions = [[NSMutableDictionary alloc] init]; if (isNetwork) { @@ -529,26 +530,43 @@ static int const RCTVideoUnset = -1; return; } #endif - - asset = [AVURLAsset URLAssetWithURL:url options:assetOptions]; + handler([AVURLAsset URLAssetWithURL:url options:assetOptions], assetOptions); } else if (isAsset) { - asset = [AVURLAsset URLAssetWithURL:url options:nil]; + if ([uri hasPrefix:@"ph://"]) { + NSString *assetId = [uri substringFromIndex:@"ph://".length]; + PHAsset *asset = [[PHAsset fetchAssetsWithLocalIdentifiers:@[assetId] options:nil] firstObject]; + PHVideoRequestOptions *options = [PHVideoRequestOptions new]; + options.networkAccessAllowed = YES; + + [[PHCachingImageManager new] requestAVAssetForVideo:asset options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) { + handler((AVURLAsset *)asset, assetOptions); + }]; + } else { + handler([AVURLAsset URLAssetWithURL:url options:nil], assetOptions); + } } else { - asset = [AVURLAsset URLAssetWithURL:[[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]] options:nil]; + AVURLAsset *asset = [AVURLAsset URLAssetWithURL:[[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]] options:nil]; + handler(asset, assetOptions); } - // Reset _loadingRequest - if (_loadingRequest != nil) { - [_loadingRequest finishLoading]; - } - _requestingCertificate = NO; - _requestingCertificateErrored = NO; - // End Reset _loadingRequest - if (self->_drm != nil) { - dispatch_queue_t queue = dispatch_queue_create("assetQueue", nil); - [asset.resourceLoader setDelegate:self queue:queue]; - } - - [self playerItemPrepareText:asset assetOptions:assetOptions withCallback:handler]; +} + +- (void)playerItemForSource:(NSDictionary *)source withCallback:(void(^)(AVPlayerItem *))handler +{ + [self loadAssetFromSource:source withCallback:^(AVURLAsset *asset, NSMutableDictionary *assetOptions) { + // Reset _loadingRequest + if (self->_loadingRequest != nil) { + [self->_loadingRequest finishLoading]; + } + self->_requestingCertificate = NO; + self->_requestingCertificateErrored = NO; + // End Reset _loadingRequest + if (self->_drm != nil) { + dispatch_queue_t queue = dispatch_queue_create("assetQueue", nil); + [asset.resourceLoader setDelegate:self queue:queue]; + } + + [self playerItemPrepareText:asset assetOptions:assetOptions withCallback:handler]; + }]; } #if __has_include() @@ -2028,4 +2046,4 @@ didCancelLoadingRequest:(AVAssetResourceLoadingRequest *)loadingRequest { } #endif -@end +@end \ No newline at end of file From 329df1d91abda9fd882c1ff2c1b7aa69a67bdb54 Mon Sep 17 00:00:00 2001 From: virgil Date: Fri, 15 Apr 2022 17:36:23 +0800 Subject: [PATCH 02/18] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20changelo?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc7f5943..6dcc12f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Add Google's maven repository to avoid build error [#2552] (https://github.com/react-native-video/react-native-video/pull/2552) +- Fix crash when the source is a cameraroll [#2639] (https://github.com/react-native-video/react-native-video/pull/2639) + ### Version 5.2.0 - Fix for tvOS native audio menu language selector From b10de93128167fad1630fba4d9f18ea2e304fd08 Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Thu, 23 Jun 2022 23:51:52 +0200 Subject: [PATCH 03/18] fix(android): ensure we don't disable playback when player is ENDED (issue #2690) --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 3dccad93..775067bb 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -815,7 +815,10 @@ class ReactExoplayerView extends FrameLayout implements player.setPlayWhenReady(true); } } else { - player.setPlayWhenReady(false); + // ensure playback is not ENDED, else it will trigger another ended event + if (player.getPlaybackState() != Player.STATE_ENDED) { + player.setPlayWhenReady(false); + } } } From 4a558f4b3252cc4d50935d1e7d61cb1ccfac79d5 Mon Sep 17 00:00:00 2001 From: evkwan Date: Tue, 3 May 2022 14:24:56 +0800 Subject: [PATCH 04/18] #2665 - fix maxbitrate property being ignored on Android due to selected track overwrite --- .../com/brentvatne/exoplayer/ReactExoplayerView.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 3dccad93..34243658 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1017,9 +1017,15 @@ class ReactExoplayerView extends FrameLayout implements private void videoLoaded() { if (loadVideoStarted) { loadVideoStarted = false; - setSelectedAudioTrack(audioTrackType, audioTrackValue); - setSelectedVideoTrack(videoTrackType, videoTrackValue); - setSelectedTextTrack(textTrackType, textTrackValue); + if (audioTrackType != null) { + setSelectedAudioTrack(audioTrackType, audioTrackValue); + } + if (videoTrackType != null) { + setSelectedVideoTrack(videoTrackType, videoTrackValue); + } + if (textTrackType != null) { + setSelectedTextTrack(textTrackType, textTrackValue); + } Format videoFormat = player.getVideoFormat(); int width = videoFormat != null ? videoFormat.width : 0; int height = videoFormat != null ? videoFormat.height : 0; From 384166b285b8c52b24591dd81b87ffab198e7230 Mon Sep 17 00:00:00 2001 From: evkwan Date: Mon, 4 Jul 2022 01:03:31 +0800 Subject: [PATCH 05/18] - update changelog with pr number --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f705bdc3..85d378bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ - Fixed Android seeking bug [#2712](https://github.com/react-native-video/react-native-video/pull/2712) - Fixed `onReadyForDisplay` not being called [#2721](https://github.com/react-native-video/react-native-video/pull/2721) - Fix type of `_eventDispatcher` on iOS target to match `bridge.eventDispatcher()` [#2720](https://github.com/react-native-video/react-native-video/pull/2720) +- Fix maxBitRate property being ignored on Android [#2670](https://github.com/react-native-video/react-native-video/pull/2670) ### Version 5.2.0 From 95a55a255125e70c852915ee5e0112224573e056 Mon Sep 17 00:00:00 2001 From: evkwan Date: Tue, 3 May 2022 14:46:11 +0800 Subject: [PATCH 06/18] - fix spacing --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 34243658..9da4fe0c 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1020,10 +1020,10 @@ class ReactExoplayerView extends FrameLayout implements if (audioTrackType != null) { setSelectedAudioTrack(audioTrackType, audioTrackValue); } - if (videoTrackType != null) { + if (videoTrackType != null) { setSelectedVideoTrack(videoTrackType, videoTrackValue); } - if (textTrackType != null) { + if (textTrackType != null) { setSelectedTextTrack(textTrackType, textTrackValue); } Format videoFormat = player.getVideoFormat(); From 12189a94eb1968d278902948c0db7a8db6e8350d Mon Sep 17 00:00:00 2001 From: evkwan Date: Tue, 3 May 2022 14:47:43 +0800 Subject: [PATCH 07/18] - fix spacing issue --- .../brentvatne/exoplayer/ReactExoplayerView.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 9da4fe0c..fdbbff44 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1018,14 +1018,14 @@ class ReactExoplayerView extends FrameLayout implements if (loadVideoStarted) { loadVideoStarted = false; if (audioTrackType != null) { - setSelectedAudioTrack(audioTrackType, audioTrackValue); - } - if (videoTrackType != null) { - setSelectedVideoTrack(videoTrackType, videoTrackValue); - } - if (textTrackType != null) { - setSelectedTextTrack(textTrackType, textTrackValue); - } + setSelectedAudioTrack(audioTrackType, audioTrackValue); + } + if (videoTrackType != null) { + setSelectedVideoTrack(videoTrackType, videoTrackValue); + } + if (textTrackType != null) { + setSelectedTextTrack(textTrackType, textTrackValue); + } Format videoFormat = player.getVideoFormat(); int width = videoFormat != null ? videoFormat.width : 0; int height = videoFormat != null ? videoFormat.height : 0; From 4aab264b732d568776b3b0df0e6d750e1abd1e55 Mon Sep 17 00:00:00 2001 From: Eran Hammer Date: Wed, 13 Jul 2022 22:42:33 -0700 Subject: [PATCH 08/18] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9fbac5b..2ccff1ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Call playbackRateChange onPlay and onPause [#1493](https://github.com/react-native-video/react-native-video/pull/1493) - Fix being unable to disable sideloaded texttracks in the AVPlayer [#2679](https://github.com/react-native-video/react-native-video/pull/2679) - Fixed crash when iOS seek method called reject on the promise [#2743](https://github.com/react-native-video/react-native-video/pull/2743) +- Fix maxBitRate property being ignored on Android [#2670](https://github.com/react-native-video/react-native-video/pull/2670) ### Version 6.0.0-alpha.1 @@ -53,7 +54,6 @@ - Fixed Android seeking bug [#2712](https://github.com/react-native-video/react-native-video/pull/2712) - Fixed `onReadyForDisplay` not being called [#2721](https://github.com/react-native-video/react-native-video/pull/2721) - Fix type of `_eventDispatcher` on iOS target to match `bridge.eventDispatcher()` [#2720](https://github.com/react-native-video/react-native-video/pull/2720) -- Fix maxBitRate property being ignored on Android [#2670](https://github.com/react-native-video/react-native-video/pull/2670) ### Version 5.2.0 From f7aeb7295064631d2c45e95ec8013ea6289e36c9 Mon Sep 17 00:00:00 2001 From: wood1986 <5212215+wood1986@users.noreply.github.com> Date: Thu, 14 Jul 2022 11:58:50 -0700 Subject: [PATCH 09/18] fix: fix the play button no shown after pausing video at the very first time --- .../com/brentvatne/exoplayer/ReactExoplayerView.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 3dccad93..bf28f998 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -403,6 +403,15 @@ class ReactExoplayerView extends FrameLayout implements eventListener = new Player.Listener() { @Override public void onPlaybackStateChanged(int playbackState) { + View playButton = playerControlView.findViewById(R.id.exo_play); + View pauseButton = playerControlView.findViewById(R.id.exo_pause); + if (playButton != null && playButton.getVisibility() == GONE) { + playButton.setVisibility(INVISIBLE); + } + if (pauseButton != null && pauseButton.getVisibility() == GONE) { + pauseButton.setVisibility(INVISIBLE); + } + reLayout(playPauseControlContainer); //Remove this eventListener once its executed. since UI will work fine once after the reLayout is done player.removeListener(eventListener); From fcea0ffcea051b284135514d11e91ff8269bacec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9B=A6?= Date: Wed, 27 Jul 2022 21:13:47 +0800 Subject: [PATCH 10/18] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20support=20came?= =?UTF-8?q?ra=20video=20for=20swift?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Video/Features/RCTVideoUtils.swift | 15 ++++++++++++++- ios/Video/RCTVideo.swift | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ios/Video/Features/RCTVideoUtils.swift b/ios/Video/Features/RCTVideoUtils.swift index d8ec8677..46cce42a 100644 --- a/ios/Video/Features/RCTVideoUtils.swift +++ b/ios/Video/Features/RCTVideoUtils.swift @@ -1,5 +1,6 @@ import AVFoundation import Promises +import Photos /*! * Collection of pure functions @@ -264,8 +265,20 @@ enum RCTVideoUtils { } } + static func preparePHAsset(uri: String) -> Promise { + return Promise(on: .global()) { fulfill, reject in + let assetId = String(uri[uri.index(uri.startIndex, offsetBy: "ph://".count)...]) + let phAsset = PHAsset.fetchAssets(withLocalIdentifiers: [assetId], options: nil).firstObject + let options = PHVideoRequestOptions() + options.isNetworkAccessAllowed = true + PHCachingImageManager().requestAVAsset(forVideo: phAsset!, options: options) { data, _, _ in + fulfill(data) + } + } + } + static func prepareAsset(source:VideoSource) -> (asset:AVURLAsset?, assetOptions:NSMutableDictionary?)? { - guard source.uri != nil && source.uri != "" else { return nil } + guard let sourceUri = source.uri, sourceUri != "" else { return nil } var asset:AVURLAsset! let bundlePath = Bundle.main.path(forResource: source.uri, ofType: source.type) ?? "" let url = source.isNetwork || source.isAsset diff --git a/ios/Video/RCTVideo.swift b/ios/Video/RCTVideo.swift index 59973a36..a339aff4 100644 --- a/ios/Video/RCTVideo.swift +++ b/ios/Video/RCTVideo.swift @@ -227,10 +227,20 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH RCTVideoUtils.delay() .then{ [weak self] in guard let self = self else {throw NSError(domain: "", code: 0, userInfo: nil)} - guard let source = self._source, - let assetResult = RCTVideoUtils.prepareAsset(source: source), - let asset = assetResult.asset, - let assetOptions = assetResult.assetOptions else { + guard let source = self._source else { + DebugLog("The source not exist") + throw NSError(domain: "", code: 0, userInfo: nil) + } + if let uri = source.uri, uri.starts(with: "ph://") { + return Promise { + RCTVideoUtils.preparePHAsset(uri: uri).then { asset in + return self.playerItemPrepareText(asset:asset, assetOptions:nil) + } + } + } + guard let assetResult = RCTVideoUtils.prepareAsset(source: source), + let asset = assetResult.asset, + let assetOptions = assetResult.assetOptions else { DebugLog("Could not find video URL in source '\(self._source)'") throw NSError(domain: "", code: 0, userInfo: nil) } From cee650c84cb37f31b2596ae1181ea36f0c80bb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9B=A6?= Date: Wed, 27 Jul 2022 21:34:08 +0800 Subject: [PATCH 11/18] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20add=20exception=20?= =?UTF-8?q?catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Video/Features/RCTVideoUtils.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/Video/Features/RCTVideoUtils.swift b/ios/Video/Features/RCTVideoUtils.swift index 46cce42a..50df8e3f 100644 --- a/ios/Video/Features/RCTVideoUtils.swift +++ b/ios/Video/Features/RCTVideoUtils.swift @@ -268,10 +268,13 @@ enum RCTVideoUtils { static func preparePHAsset(uri: String) -> Promise { return Promise(on: .global()) { fulfill, reject in let assetId = String(uri[uri.index(uri.startIndex, offsetBy: "ph://".count)...]) - let phAsset = PHAsset.fetchAssets(withLocalIdentifiers: [assetId], options: nil).firstObject + guard let phAsset = PHAsset.fetchAssets(withLocalIdentifiers: [assetId], options: nil).firstObject else { + reject(NSError(domain: "", code: 0, userInfo: nil)) + return + } let options = PHVideoRequestOptions() options.isNetworkAccessAllowed = true - PHCachingImageManager().requestAVAsset(forVideo: phAsset!, options: options) { data, _, _ in + PHCachingImageManager().requestAVAsset(forVideo: phAsset, options: options) { data, _, _ in fulfill(data) } } From f990ec9de12977d87673f587b72d0987d6c61a0b Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Mon, 1 Aug 2022 15:51:10 +0200 Subject: [PATCH 12/18] fix: invalid doc path --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 9ac52616..6d276cd0 100644 --- a/API.md +++ b/API.md @@ -436,7 +436,7 @@ Determines if the player needs to throw an error when connection is lost or not Platforms: Android ### DRM -To setup DRM please follow [this guide](./DRM.md) +To setup DRM please follow [this guide](./docs/DRM.md) Platforms: Android, iOS From edd0d4ec83f039bf7114ad35b4fbb8ea5f7a58ab Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Mon, 1 Aug 2022 15:51:57 +0200 Subject: [PATCH 13/18] chore: add warning in changelog to manage library upgrade to V6 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0778647..72d42d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Version 6.0.0-alpha.1 - Remove Android MediaPlayer support [#2724](https://github.com/react-native-video/react-native-video/pull/2724) + **WARNING**: when switching from older version to V6, you need to remove all refrerences of android-exoplayer. This android-exoplayer folder has been renamed to android. Exoplayer is now the only player implementation supported. + - Replace Image.propTypes with ImagePropTypes. [#2718](https://github.com/react-native-video/react-native-video/pull/2718) - Fix iOS build caused by type mismatch [#2720](https://github.com/react-native-video/react-native-video/pull/2720) - ERROR TypeError: undefined is not an object (evaluating '_reactNative.Image.propTypes.resizeMode') [#2714](https://github.com/react-native-video/react-native-video/pull/2714) From efc94d7f2cfa0cb9203c3a8c0aa49f6abfa82557 Mon Sep 17 00:00:00 2001 From: Matthew Leffler Date: Mon, 1 Aug 2022 16:07:25 -0600 Subject: [PATCH 14/18] docs: Fix page path --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index 9ac52616..6d276cd0 100644 --- a/API.md +++ b/API.md @@ -436,7 +436,7 @@ Determines if the player needs to throw an error when connection is lost or not Platforms: Android ### DRM -To setup DRM please follow [this guide](./DRM.md) +To setup DRM please follow [this guide](./docs/DRM.md) Platforms: Android, iOS From 1631e5de5230d1d18b12389c137537e6b602e425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9B=A6?= Date: Tue, 2 Aug 2022 15:21:43 +0800 Subject: [PATCH 15/18] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20change=20cha?= =?UTF-8?q?ngelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index adfb0da5..805868d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Fix being unable to disable sideloaded texttracks in the AVPlayer [#2679](https://github.com/react-native-video/react-native-video/pull/2679) - Fixed crash when iOS seek method called reject on the promise [#2743](https://github.com/react-native-video/react-native-video/pull/2743) - Fix maxBitRate property being ignored on Android [#2670](https://github.com/react-native-video/react-native-video/pull/2670) +- Fix crash when the source is a cameraroll [#2639] (https://github.com/react-native-video/react-native-video/pull/2639) ### Version 6.0.0-alpha.1 @@ -55,8 +56,6 @@ - Fixed `onReadyForDisplay` not being called [#2721](https://github.com/react-native-video/react-native-video/pull/2721) - Fix type of `_eventDispatcher` on iOS target to match `bridge.eventDispatcher()` [#2720](https://github.com/react-native-video/react-native-video/pull/2720) -- Fix crash when the source is a cameraroll [#2639] (https://github.com/react-native-video/react-native-video/pull/2639) - ### Version 5.2.0 - Fix for tvOS native audio menu language selector From e1987e561ab06e96b86396069492ee792943ab5a Mon Sep 17 00:00:00 2001 From: john Date: Fri, 5 Aug 2022 09:53:22 +0800 Subject: [PATCH 16/18] fix rctDelegate is nil --- ios/Video/RCTVideoPlayerViewController.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/Video/RCTVideoPlayerViewController.swift b/ios/Video/RCTVideoPlayerViewController.swift index 95c926af..e398e62f 100644 --- a/ios/Video/RCTVideoPlayerViewController.swift +++ b/ios/Video/RCTVideoPlayerViewController.swift @@ -19,8 +19,11 @@ class RCTVideoPlayerViewController: AVPlayerViewController { override func viewDidDisappear(_ animated: Bool) { super.viewDidDisappear(animated) - rctDelegate.videoPlayerViewControllerWillDismiss(playerViewController: self) - rctDelegate.videoPlayerViewControllerDidDismiss(playerViewController: self) + + if rctDelegate != nil { + rctDelegate.videoPlayerViewControllerWillDismiss(playerViewController: self) + rctDelegate.videoPlayerViewControllerDidDismiss(playerViewController: self) + } } #if !TARGET_OS_TV From f32da092b17b912f013da611358302addcea310d Mon Sep 17 00:00:00 2001 From: Olivier Bouillet <62574056+freeboub@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:10:11 +0200 Subject: [PATCH 17/18] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 54296c23..223be5ae 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,10 +10,12 @@ assignees: '' # Bug ## Platform From 1a53c10c06534a0c2a22d0c6eebcc64cec701706 Mon Sep 17 00:00:00 2001 From: olivier bouillet Date: Sat, 20 Aug 2022 14:26:53 +0200 Subject: [PATCH 18/18] doc: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c9bef79..c8589cd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Version 6.0.0-alpha.2 +- Fix Android #2690 ensure onEnd is not sent twice [#2690](https://github.com/react-native-video/react-native-video/issues/2690) - Fix Exoplayer progress not reported when paused [#2664](https://github.com/react-native-video/react-native-video/pull/2664) - Call playbackRateChange onPlay and onPause [#1493](https://github.com/react-native-video/react-native-video/pull/1493)