Compare commits
2 Commits
loewy/fix-
...
loewy/fix-
| Author | SHA1 | Date | |
|---|---|---|---|
| dfe2957087 | |||
| d7563cfd93 |
@@ -4,7 +4,13 @@ import React
|
|||||||
@objc(RCTVideoManager)
|
@objc(RCTVideoManager)
|
||||||
class RCTVideoManager: RCTViewManager {
|
class RCTVideoManager: RCTViewManager {
|
||||||
override func view() -> UIView {
|
override func view() -> UIView {
|
||||||
return RCTVideo(eventDispatcher: (RCTBridge.current().eventDispatcher() as! RCTEventDispatcher))
|
// `RCTBridge.current()` returns nil under bridgeless (New Architecture), and it
|
||||||
|
// is nonnull-annotated, so Swift emits an unconditional nil-check trap around
|
||||||
|
// the call -- optional chaining does not avoid it. Every <Video> mount killed
|
||||||
|
// the app. RCTVideo only stores this dispatcher and never reads it (events go
|
||||||
|
// out through the RCT_EXPORT_VIEW_PROPERTY direct event blocks), so skip the
|
||||||
|
// lookup entirely.
|
||||||
|
return RCTVideo(eventDispatcher: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func methodQueue() -> DispatchQueue {
|
func methodQueue() -> DispatchQueue {
|
||||||
|
|||||||
@@ -32,17 +32,18 @@
|
|||||||
"react-native": "0.73.2",
|
"react-native": "0.73.2",
|
||||||
"react-native-windows": "^0.61.0-0",
|
"react-native-windows": "^0.61.0-0",
|
||||||
"release-it": "^16.2.1",
|
"release-it": "^16.2.1",
|
||||||
"typescript": "5.1.6",
|
|
||||||
"patch-package": "^8.0.0"
|
"patch-package": "^8.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"shaka-player": "^4.11.7"
|
"shaka-player": "^4.11.7",
|
||||||
|
"typescript": "5.6.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
"react-native": "*"
|
"react-native": "*"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"install": "tsc --noCheck",
|
||||||
"lint": "yarn eslint .",
|
"lint": "yarn eslint .",
|
||||||
"build": "yarn tsc",
|
"build": "yarn tsc",
|
||||||
"prepare": "yarn build",
|
"prepare": "yarn build",
|
||||||
@@ -61,6 +62,8 @@
|
|||||||
"windows",
|
"windows",
|
||||||
"src",
|
"src",
|
||||||
"lib",
|
"lib",
|
||||||
|
"tsconfig.json",
|
||||||
|
"tsconfig.build.json",
|
||||||
"react-native-video.podspec",
|
"react-native-video.podspec",
|
||||||
"app.plugin.js",
|
"app.plugin.js",
|
||||||
"!android/build",
|
"!android/build",
|
||||||
|
|||||||
@@ -734,7 +734,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
|||||||
|
|
||||||
// poster style
|
// poster style
|
||||||
const baseStyle: StyleProp<ImageStyle> = {
|
const baseStyle: StyleProp<ImageStyle> = {
|
||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFill,
|
||||||
resizeMode: _posterResizeMode,
|
resizeMode: _posterResizeMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@ const Video = forwardRef<VideoRef, ReactVideoProps>(
|
|||||||
|
|
||||||
const _style: StyleProp<ViewStyle> = useMemo(
|
const _style: StyleProp<ViewStyle> = useMemo(
|
||||||
() => ({
|
() => ({
|
||||||
...StyleSheet.absoluteFillObject,
|
...StyleSheet.absoluteFill,
|
||||||
...(showPoster ? {display: 'none'} : {}),
|
...(showPoster ? {display: 'none'} : {}),
|
||||||
}),
|
}),
|
||||||
[showPoster],
|
[showPoster],
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig",
|
"extends": "./tsconfig",
|
||||||
"exclude": ["examples", "lib"]
|
"exclude": ["examples", "lib"]
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"lib": ["esnext"],
|
"lib": ["esnext"],
|
||||||
"module": "CommonJS",
|
"module": "Node16",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Node16",
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noImplicitUseStrict": false,
|
"noImplicitUseStrict": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user