Skip to content

Commit cb3e8c8

Browse files
authored
Merge branch 'release/4.4.2' into posterfix
2 parents fcef441 + 88d2aed commit cb3e8c8

File tree

7 files changed

+51
-46
lines changed

7 files changed

+51
-46
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
## Changelog
22

3-
### next
3+
### Version 4.4.2
4+
* 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)
5+
* Replaced RCTBubblingEventBlock events by RCTDirectEventBlock to avoid event name collisions [#1625](https://github.com/react-native-community/react-native-video/pull/1625)
46
* Added `onPlaybackRateChange` to README [#1578](https://github.com/react-native-community/react-native-video/pull/1578)
57
* Added `onReadyForDisplay` to README [#1627](https://github.com/react-native-community/react-native-video/pull/1627)
68
* Improved handling of poster image. Fixes bug with displaying video and poster simultaneously. [#1627](https://github.com/react-native-community/react-native-video/pull/1627)
9+
* Fix background audio stopping on iOS when using `controls` [#1614](https://github.com/react-native-community/react-native-video/pull/1614)
710

811
### Version 4.4.1
912
* Fix tvOS picture-in-picture compilation regression [#1518](https://github.com/react-native-community/react-native-video/pull/1518)

android-exoplayer/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ android {
2222
}
2323

2424
dependencies {
25-
compileOnly "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
25+
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
2626
implementation('com.google.android.exoplayer:exoplayer:2.9.3') {
2727
exclude group: 'com.android.support'
2828
}

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ android {
2121

2222
dependencies {
2323
//noinspection GradleDynamicVersion
24-
compileOnly "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
24+
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
2525
implementation 'com.yqritc:android-scalablevideoview:1.0.4'
2626
}

ios/Video/RCTVideo.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@
2121
@interface RCTVideo : UIView <RCTVideoPlayerViewControllerDelegate, AVPictureInPictureControllerDelegate>
2222
#endif
2323

24-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoLoadStart;
25-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoLoad;
26-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoBuffer;
27-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoError;
28-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoProgress;
29-
@property (nonatomic, copy) RCTBubblingEventBlock onBandwidthUpdate;
30-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoSeek;
31-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoEnd;
32-
@property (nonatomic, copy) RCTBubblingEventBlock onTimedMetadata;
33-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoAudioBecomingNoisy;
34-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerWillPresent;
35-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerDidPresent;
36-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerWillDismiss;
37-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerDidDismiss;
38-
@property (nonatomic, copy) RCTBubblingEventBlock onReadyForDisplay;
39-
@property (nonatomic, copy) RCTBubblingEventBlock onPlaybackStalled;
40-
@property (nonatomic, copy) RCTBubblingEventBlock onPlaybackResume;
41-
@property (nonatomic, copy) RCTBubblingEventBlock onPlaybackRateChange;
42-
@property (nonatomic, copy) RCTBubblingEventBlock onVideoExternalPlaybackChange;
43-
@property (nonatomic, copy) RCTBubblingEventBlock onPictureInPictureStatusChanged;
44-
@property (nonatomic, copy) RCTBubblingEventBlock onRestoreUserInterfaceForPictureInPictureStop;
24+
@property (nonatomic, copy) RCTDirectEventBlock onVideoLoadStart;
25+
@property (nonatomic, copy) RCTDirectEventBlock onVideoLoad;
26+
@property (nonatomic, copy) RCTDirectEventBlock onVideoBuffer;
27+
@property (nonatomic, copy) RCTDirectEventBlock onVideoError;
28+
@property (nonatomic, copy) RCTDirectEventBlock onVideoProgress;
29+
@property (nonatomic, copy) RCTDirectEventBlock onBandwidthUpdate;
30+
@property (nonatomic, copy) RCTDirectEventBlock onVideoSeek;
31+
@property (nonatomic, copy) RCTDirectEventBlock onVideoEnd;
32+
@property (nonatomic, copy) RCTDirectEventBlock onTimedMetadata;
33+
@property (nonatomic, copy) RCTDirectEventBlock onVideoAudioBecomingNoisy;
34+
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerWillPresent;
35+
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerDidPresent;
36+
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerWillDismiss;
37+
@property (nonatomic, copy) RCTDirectEventBlock onVideoFullscreenPlayerDidDismiss;
38+
@property (nonatomic, copy) RCTDirectEventBlock onReadyForDisplay;
39+
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackStalled;
40+
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackResume;
41+
@property (nonatomic, copy) RCTDirectEventBlock onPlaybackRateChange;
42+
@property (nonatomic, copy) RCTDirectEventBlock onVideoExternalPlaybackChange;
43+
@property (nonatomic, copy) RCTDirectEventBlock onPictureInPictureStatusChanged;
44+
@property (nonatomic, copy) RCTDirectEventBlock onRestoreUserInterfaceForPictureInPictureStop;
4545

4646
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER;
4747

ios/Video/RCTVideo.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ - (void)applicationDidEnterBackground:(NSNotification *)notification
223223
if (_playInBackground) {
224224
// Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html
225225
[_playerLayer setPlayer:nil];
226+
[_playerViewController setPlayer:nil];
226227
}
227228
}
228229

@@ -231,6 +232,7 @@ - (void)applicationWillEnterForeground:(NSNotification *)notification
231232
[self applyModifiers];
232233
if (_playInBackground) {
233234
[_playerLayer setPlayer:_player];
235+
[_playerViewController setPlayer:_player];
234236
}
235237
}
236238

ios/Video/RCTVideoManager.m

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ - (dispatch_queue_t)methodQueue
4545
RCT_EXPORT_VIEW_PROPERTY(progressUpdateInterval, float);
4646
RCT_EXPORT_VIEW_PROPERTY(restoreUserInterfaceForPIPStopCompletionHandler, BOOL);
4747
/* Should support: onLoadStart, onLoad, and onError to stay consistent with Image */
48-
RCT_EXPORT_VIEW_PROPERTY(onVideoLoadStart, RCTBubblingEventBlock);
49-
RCT_EXPORT_VIEW_PROPERTY(onVideoLoad, RCTBubblingEventBlock);
50-
RCT_EXPORT_VIEW_PROPERTY(onVideoBuffer, RCTBubblingEventBlock);
51-
RCT_EXPORT_VIEW_PROPERTY(onVideoError, RCTBubblingEventBlock);
52-
RCT_EXPORT_VIEW_PROPERTY(onVideoProgress, RCTBubblingEventBlock);
53-
RCT_EXPORT_VIEW_PROPERTY(onBandwidthUpdate, RCTBubblingEventBlock);
54-
RCT_EXPORT_VIEW_PROPERTY(onVideoSeek, RCTBubblingEventBlock);
55-
RCT_EXPORT_VIEW_PROPERTY(onVideoEnd, RCTBubblingEventBlock);
56-
RCT_EXPORT_VIEW_PROPERTY(onTimedMetadata, RCTBubblingEventBlock);
57-
RCT_EXPORT_VIEW_PROPERTY(onVideoAudioBecomingNoisy, RCTBubblingEventBlock);
58-
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillPresent, RCTBubblingEventBlock);
59-
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidPresent, RCTBubblingEventBlock);
60-
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillDismiss, RCTBubblingEventBlock);
61-
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidDismiss, RCTBubblingEventBlock);
62-
RCT_EXPORT_VIEW_PROPERTY(onReadyForDisplay, RCTBubblingEventBlock);
63-
RCT_EXPORT_VIEW_PROPERTY(onPlaybackStalled, RCTBubblingEventBlock);
64-
RCT_EXPORT_VIEW_PROPERTY(onPlaybackResume, RCTBubblingEventBlock);
65-
RCT_EXPORT_VIEW_PROPERTY(onPlaybackRateChange, RCTBubblingEventBlock);
66-
RCT_EXPORT_VIEW_PROPERTY(onVideoExternalPlaybackChange, RCTBubblingEventBlock);
48+
RCT_EXPORT_VIEW_PROPERTY(onVideoLoadStart, RCTDirectEventBlock);
49+
RCT_EXPORT_VIEW_PROPERTY(onVideoLoad, RCTDirectEventBlock);
50+
RCT_EXPORT_VIEW_PROPERTY(onVideoBuffer, RCTDirectEventBlock);
51+
RCT_EXPORT_VIEW_PROPERTY(onVideoError, RCTDirectEventBlock);
52+
RCT_EXPORT_VIEW_PROPERTY(onVideoProgress, RCTDirectEventBlock);
53+
RCT_EXPORT_VIEW_PROPERTY(onBandwidthUpdate, RCTDirectEventBlock);
54+
RCT_EXPORT_VIEW_PROPERTY(onVideoSeek, RCTDirectEventBlock);
55+
RCT_EXPORT_VIEW_PROPERTY(onVideoEnd, RCTDirectEventBlock);
56+
RCT_EXPORT_VIEW_PROPERTY(onTimedMetadata, RCTDirectEventBlock);
57+
RCT_EXPORT_VIEW_PROPERTY(onVideoAudioBecomingNoisy, RCTDirectEventBlock);
58+
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillPresent, RCTDirectEventBlock);
59+
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidPresent, RCTDirectEventBlock);
60+
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillDismiss, RCTDirectEventBlock);
61+
RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidDismiss, RCTDirectEventBlock);
62+
RCT_EXPORT_VIEW_PROPERTY(onReadyForDisplay, RCTDirectEventBlock);
63+
RCT_EXPORT_VIEW_PROPERTY(onPlaybackStalled, RCTDirectEventBlock);
64+
RCT_EXPORT_VIEW_PROPERTY(onPlaybackResume, RCTDirectEventBlock);
65+
RCT_EXPORT_VIEW_PROPERTY(onPlaybackRateChange, RCTDirectEventBlock);
66+
RCT_EXPORT_VIEW_PROPERTY(onVideoExternalPlaybackChange, RCTDirectEventBlock);
6767
RCT_REMAP_METHOD(save,
6868
options:(NSDictionary *)options
6969
reactTag:(nonnull NSNumber *)reactTag
@@ -79,8 +79,8 @@ - (dispatch_queue_t)methodQueue
7979
}
8080
}];
8181
}
82-
RCT_EXPORT_VIEW_PROPERTY(onPictureInPictureStatusChanged, RCTBubblingEventBlock);
83-
RCT_EXPORT_VIEW_PROPERTY(onRestoreUserInterfaceForPictureInPictureStop, RCTBubblingEventBlock);
82+
RCT_EXPORT_VIEW_PROPERTY(onPictureInPictureStatusChanged, RCTDirectEventBlock);
83+
RCT_EXPORT_VIEW_PROPERTY(onRestoreUserInterfaceForPictureInPictureStop, RCTDirectEventBlock);
8484

8585
- (NSDictionary *)constantsToExport
8686
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-video",
3-
"version": "4.4.1",
3+
"version": "4.4.2",
44
"description": "A <Video /> element for react-native",
55
"main": "Video.js",
66
"license": "MIT",

0 commit comments

Comments
 (0)