react-native-unified-player 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/unifiedplayer/hybrids/videoplayer/HybridVideoPlayer.kt +1 -0
- package/ios/hybrids/VideoPlayer/HybridVideoPlayer.swift +5 -1
- package/ios/view/VideoComponentView.swift +27 -1
- package/ios/view/VideoComponentViewObserver.swift +7 -3
- package/lib/module/core/video-view/NativeVideoView.tsx +18 -0
- package/lib/module/core/video-view/VideoView.js +1 -1
- package/lib/module/core/video-view/VideoView.js.map +1 -1
- package/lib/module/spec/fabric/VideoViewNativeComponent.ts +17 -0
- package/lib/typescript/src/core/video-view/NativeVideoView.d.ts +1 -1
- package/lib/typescript/src/core/video-view/NativeVideoView.d.ts.map +1 -1
- package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts +4 -3
- package/lib/typescript/src/spec/fabric/VideoViewNativeComponent.d.ts.map +1 -1
- package/package.json +9 -1
- package/src/spec/fabric/VideoViewNativeComponent.ts +5 -8
- package/lib/module/core/video-view/NativeVideoView.js +0 -13
- package/lib/module/core/video-view/NativeVideoView.js.map +0 -1
- package/lib/module/spec/fabric/VideoViewNativeComponent.js +0 -8
- package/lib/module/spec/fabric/VideoViewNativeComponent.js.map +0 -1
package/android/build.gradle
CHANGED
|
@@ -531,6 +531,7 @@ class HybridVideoPlayer() : HybridVideoPlayerSpec(), AutoCloseable {
|
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
override fun onPlayerError(error: PlaybackException) {
|
|
534
|
+
Log.e(TAG, "Player error: ${error.errorCodeName} - ${error.message}", error)
|
|
534
535
|
status = VideoPlayerStatus.ERROR
|
|
535
536
|
stopProgressUpdates()
|
|
536
537
|
}
|
|
@@ -52,7 +52,11 @@ class HybridVideoPlayer: HybridVideoPlayerSpec, NativeVideoPlayerSpec {
|
|
|
52
52
|
}
|
|
53
53
|
self.player.replaceCurrentItem(with: self.playerItem)
|
|
54
54
|
} catch {
|
|
55
|
-
//
|
|
55
|
+
// Only ignore cancellation errors, report others via status change
|
|
56
|
+
if !(error is CancellationError) {
|
|
57
|
+
print("[UnifiedPlayer] Initialization failed: \(error.localizedDescription)")
|
|
58
|
+
self.status = .error
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -49,15 +49,41 @@ import UIKit
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/// User's controls setting (preserved for when exiting fullscreen)
|
|
53
|
+
private var _userControls: Bool = false
|
|
54
|
+
|
|
55
|
+
/// Whether currently in fullscreen mode
|
|
56
|
+
private var _isFullscreen: Bool = false
|
|
57
|
+
|
|
52
58
|
public var controls: Bool = false {
|
|
53
59
|
didSet {
|
|
60
|
+
_userControls = controls
|
|
54
61
|
DispatchQueue.main.async { [weak self] in
|
|
55
62
|
guard let self = self, let playerViewController = self.playerViewController else { return }
|
|
56
|
-
|
|
63
|
+
// In fullscreen, always show controls; otherwise respect user setting
|
|
64
|
+
playerViewController.showsPlaybackControls = self._isFullscreen ? true : self.controls
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
|
|
69
|
+
/// Called when entering fullscreen to enable controls overlay
|
|
70
|
+
func onEnterFullscreen() {
|
|
71
|
+
_isFullscreen = true
|
|
72
|
+
DispatchQueue.main.async { [weak self] in
|
|
73
|
+
guard let self = self, let playerViewController = self.playerViewController else { return }
|
|
74
|
+
playerViewController.showsPlaybackControls = true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// Called when exiting fullscreen to restore user's controls setting
|
|
79
|
+
func onExitFullscreen() {
|
|
80
|
+
_isFullscreen = false
|
|
81
|
+
DispatchQueue.main.async { [weak self] in
|
|
82
|
+
guard let self = self, let playerViewController = self.playerViewController else { return }
|
|
83
|
+
playerViewController.showsPlaybackControls = self._userControls
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
61
87
|
public var allowsPictureInPicturePlayback: Bool = false {
|
|
62
88
|
didSet {
|
|
63
89
|
DispatchQueue.main.async { [weak self] in
|
|
@@ -123,19 +123,23 @@ class VideoComponentViewObserver: NSObject, AVPlayerViewControllerDelegate {
|
|
|
123
123
|
willEndFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator
|
|
124
124
|
) {
|
|
125
125
|
delegate?.willExitFullscreen()
|
|
126
|
-
|
|
126
|
+
|
|
127
127
|
coordinator.animate(alongsideTransition: nil) { [weak self] _ in
|
|
128
128
|
guard let self = self else { return }
|
|
129
|
+
// Restore user's controls setting when exiting fullscreen
|
|
130
|
+
self.view?.onExitFullscreen()
|
|
129
131
|
self.delegate?.onFullscreenChange(false)
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
|
-
|
|
134
|
+
|
|
133
135
|
func playerViewController(
|
|
134
136
|
_: AVPlayerViewController,
|
|
135
137
|
willBeginFullScreenPresentationWithAnimationCoordinator coordinator: UIViewControllerTransitionCoordinator
|
|
136
138
|
) {
|
|
137
139
|
delegate?.willEnterFullscreen()
|
|
138
|
-
|
|
140
|
+
// Enable controls overlay when entering fullscreen
|
|
141
|
+
view?.onEnterFullscreen()
|
|
142
|
+
|
|
139
143
|
coordinator.animate(alongsideTransition: nil) { [weak self] _ in
|
|
140
144
|
guard let self = self else { return }
|
|
141
145
|
self.delegate?.onFullscreenChange(true)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Platform, UIManager } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import VideoViewNativeComponent from '../../spec/fabric/VideoViewNativeComponent';
|
|
4
|
+
|
|
5
|
+
const LINKING_ERROR =
|
|
6
|
+
`The package 'react-native-unified-player' doesn't seem to be linked. Make sure: \n\n` +
|
|
7
|
+
Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
|
|
8
|
+
'- You rebuilt the app after installing the package\n' +
|
|
9
|
+
'- You are not using Expo Go\n';
|
|
10
|
+
|
|
11
|
+
const ComponentName = 'RNCVideoView';
|
|
12
|
+
|
|
13
|
+
export const NativeVideoView =
|
|
14
|
+
UIManager.getViewManagerConfig(ComponentName) != null
|
|
15
|
+
? VideoViewNativeComponent
|
|
16
|
+
: () => {
|
|
17
|
+
throw new Error(LINKING_ERROR);
|
|
18
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { NitroModules } from 'react-native-nitro-modules';
|
|
5
5
|
import { tryParseNativeVideoError, VideoComponentError, VideoError } from "../types/VideoError.js";
|
|
6
|
-
import { NativeVideoView } from
|
|
6
|
+
import { NativeVideoView } from './NativeVideoView';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
let nitroIdCounter = 1;
|
|
9
9
|
const VideoViewViewManagerFactory = NitroModules.createHybridObject('VideoViewViewManagerFactory');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","NitroModules","tryParseNativeVideoError","VideoComponentError","VideoError","NativeVideoView","jsx","_jsx","nitroIdCounter","VideoViewViewManagerFactory","createHybridObject","wrapNativeViewManagerFunction","manager","func","error","updateProps","props","player","__getNativePlayer","controls","pictureInPicture","autoEnterPictureInPicture","resizeMode","keepScreenAwake","surfaceType","VideoView","forwardRef","autoplay","fullscreen","onPictureInPictureChange","onFullscreenChange","willEnterFullscreen","willExitFullscreen","willEnterPictureInPicture","willExitPictureInPicture","ref","nitroId","useMemo","nitroViewManager","useRef","isManagerReady","setIsManagerReady","useState","setupViewManager","useCallback","id","console","log","current","createViewManager","parsedError","code","warn","onNitroIdChange","event","nativeEvent","useImperativeHandle","enterFullscreen","exitFullscreen","enterPictureInPicture","exitPictureInPicture","canEnterPictureInPicture","addEventListener","callback","addOnPictureInPictureChangeListener","addOnFullscreenChangeListener","addWillEnterFullscreenListener","addWillExitFullscreenListener","addWillEnterPictureInPictureListener","addWillExitPictureInPictureListener","Error","useEffect","clearAllListeners","subscriptions","push","forEach","sub","remove","hasAutoplayedRef","play","displayName","memo"],"sourceRoot":"../../../../src","sources":["core/video-view/VideoView.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,4BAA4B;AASzD,SACEC,wBAAwB,EACxBC,mBAAmB,EACnBC,UAAU,QACL,wBAAqB;AAE5B,SAASC,eAAe,QAAQ,
|
|
1
|
+
{"version":3,"names":["React","NitroModules","tryParseNativeVideoError","VideoComponentError","VideoError","NativeVideoView","jsx","_jsx","nitroIdCounter","VideoViewViewManagerFactory","createHybridObject","wrapNativeViewManagerFunction","manager","func","error","updateProps","props","player","__getNativePlayer","controls","pictureInPicture","autoEnterPictureInPicture","resizeMode","keepScreenAwake","surfaceType","VideoView","forwardRef","autoplay","fullscreen","onPictureInPictureChange","onFullscreenChange","willEnterFullscreen","willExitFullscreen","willEnterPictureInPicture","willExitPictureInPicture","ref","nitroId","useMemo","nitroViewManager","useRef","isManagerReady","setIsManagerReady","useState","setupViewManager","useCallback","id","console","log","current","createViewManager","parsedError","code","warn","onNitroIdChange","event","nativeEvent","useImperativeHandle","enterFullscreen","exitFullscreen","enterPictureInPicture","exitPictureInPicture","canEnterPictureInPicture","addEventListener","callback","addOnPictureInPictureChangeListener","addOnFullscreenChangeListener","addWillEnterFullscreenListener","addWillExitFullscreenListener","addWillEnterPictureInPictureListener","addWillExitPictureInPictureListener","Error","useEffect","clearAllListeners","subscriptions","push","forEach","sub","remove","hasAutoplayedRef","play","displayName","memo"],"sourceRoot":"../../../../src","sources":["core/video-view/VideoView.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,4BAA4B;AASzD,SACEC,wBAAwB,EACxBC,mBAAmB,EACnBC,UAAU,QACL,wBAAqB;AAE5B,SAASC,eAAe,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAA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,17 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
5
|
+
|
|
6
|
+
type OnNitroIdChangeEvent = Readonly<{
|
|
7
|
+
nitroId: Int32;
|
|
8
|
+
}>;
|
|
9
|
+
|
|
10
|
+
export interface NativeProps extends ViewProps {
|
|
11
|
+
nitroId: Int32;
|
|
12
|
+
onNitroIdChange?: DirectEventHandler<OnNitroIdChangeEvent>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeProps>('RNCVideoView', {
|
|
16
|
+
paperComponentName: 'RNCVideoView',
|
|
17
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const NativeVideoView: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<import("../../spec/fabric/VideoViewNativeComponent").
|
|
1
|
+
export declare const NativeVideoView: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<import("../../spec/fabric/VideoViewNativeComponent").NativeProps> | (() => never);
|
|
2
2
|
//# sourceMappingURL=NativeVideoView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeVideoView.d.ts","sourceRoot":"","sources":["../../../../../src/core/video-view/NativeVideoView.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"NativeVideoView.d.ts","sourceRoot":"","sources":["../../../../../src/core/video-view/NativeVideoView.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,eAAe,yKAKrB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
4
|
type OnNitroIdChangeEvent = Readonly<{
|
|
4
5
|
nitroId: Int32;
|
|
5
6
|
}>;
|
|
6
|
-
export interface
|
|
7
|
+
export interface NativeProps extends ViewProps {
|
|
7
8
|
nitroId: Int32;
|
|
8
9
|
onNitroIdChange?: DirectEventHandler<OnNitroIdChangeEvent>;
|
|
9
10
|
}
|
|
10
|
-
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<
|
|
11
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
11
12
|
export default _default;
|
|
12
13
|
//# sourceMappingURL=VideoViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../src/spec/fabric/VideoViewNativeComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VideoViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../src/spec/fabric/VideoViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAEpF,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,OAAO,EAAE,KAAK,CAAC;IACf,eAAe,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;CAC5D;;AAED,wBAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-unified-player",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Unified Player",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -169,5 +169,13 @@
|
|
|
169
169
|
"type": "legacy-view",
|
|
170
170
|
"languages": "kotlin-objc",
|
|
171
171
|
"version": "0.49.8"
|
|
172
|
+
},
|
|
173
|
+
"codegenConfig": {
|
|
174
|
+
"name": "RNCVideoViewSpec",
|
|
175
|
+
"type": "components",
|
|
176
|
+
"jsSrcsDir": "src/spec/fabric",
|
|
177
|
+
"android": {
|
|
178
|
+
"javaPackageName": "com.facebook.react.viewmanagers"
|
|
179
|
+
}
|
|
172
180
|
}
|
|
173
181
|
}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
-
import type {
|
|
3
|
-
DirectEventHandler,
|
|
4
|
-
Int32,
|
|
5
|
-
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
1
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
5
|
|
|
8
6
|
type OnNitroIdChangeEvent = Readonly<{
|
|
9
7
|
nitroId: Int32;
|
|
10
8
|
}>;
|
|
11
9
|
|
|
12
|
-
export interface
|
|
10
|
+
export interface NativeProps extends ViewProps {
|
|
13
11
|
nitroId: Int32;
|
|
14
12
|
onNitroIdChange?: DirectEventHandler<OnNitroIdChangeEvent>;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
export default codegenNativeComponent<
|
|
18
|
-
interfaceOnly: true,
|
|
15
|
+
export default codegenNativeComponent<NativeProps>('RNCVideoView', {
|
|
19
16
|
paperComponentName: 'RNCVideoView',
|
|
20
17
|
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { Platform, UIManager } from 'react-native';
|
|
4
|
-
import VideoViewNativeComponent from "../../spec/fabric/VideoViewNativeComponent.js";
|
|
5
|
-
const LINKING_ERROR = `The package 'react-native-unified-player' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
6
|
-
ios: "- You have run 'pod install'\n",
|
|
7
|
-
default: ''
|
|
8
|
-
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
9
|
-
const ComponentName = 'RNCVideoView';
|
|
10
|
-
export const NativeVideoView = UIManager.getViewManagerConfig(ComponentName) != null ? VideoViewNativeComponent : () => {
|
|
11
|
-
throw new Error(LINKING_ERROR);
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=NativeVideoView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","UIManager","VideoViewNativeComponent","LINKING_ERROR","select","ios","default","ComponentName","NativeVideoView","getViewManagerConfig","Error"],"sourceRoot":"../../../../src","sources":["core/video-view/NativeVideoView.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAElD,OAAOC,wBAAwB,MAAM,+CAA4C;AAEjF,MAAMC,aAAa,GACjB,sFAAsF,GACtFH,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,aAAa,GAAG,cAAc;AAEpC,OAAO,MAAMC,eAAe,GAC1BP,SAAS,CAACQ,oBAAoB,CAACF,aAAa,CAAC,IAAI,IAAI,GACjDL,wBAAwB,GACxB,MAAM;EACJ,MAAM,IAAIQ,KAAK,CAACP,aAAa,CAAC;AAChC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
-
export default codegenNativeComponent('RNCVideoView', {
|
|
5
|
-
interfaceOnly: true,
|
|
6
|
-
paperComponentName: 'RNCVideoView'
|
|
7
|
-
});
|
|
8
|
-
//# sourceMappingURL=VideoViewNativeComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["codegenNativeComponent","interfaceOnly","paperComponentName"],"sourceRoot":"../../../../src","sources":["spec/fabric/VideoViewNativeComponent.ts"],"mappings":";;AAKA,OAAOA,sBAAsB,MAAM,yDAAyD;AAW5F,eAAeA,sBAAsB,CAAsB,cAAc,EAAE;EACzEC,aAAa,EAAE,IAAI;EACnBC,kBAAkB,EAAE;AACtB,CAAC,CAAC","ignoreList":[]}
|