Skip to content

Commit 3c9bae7

Browse files
refactor: events logic (#4798)
1 parent 95ddeeb commit 3c9bae7

File tree

177 files changed

+3760
-2560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+3760
-2560
lines changed

bun.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151
},
5252
"example": {
5353
"name": "react-native-video-example",
54-
"version": "7.0.0-alpha.11",
54+
"version": "7.0.0-beta.0",
5555
"dependencies": {
5656
"@react-native-community/slider": "^4.5.6",
5757
"@react-native-video/drm": "*",
5858
"react": "18.3.1",
5959
"react-native": "^0.77.0",
60-
"react-native-nitro-modules": "^0.30.0",
60+
"react-native-nitro-modules": "^0.31.0",
6161
"react-native-video": "*",
6262
},
6363
"devDependencies": {
@@ -79,7 +79,7 @@
7979
},
8080
"packages/drm-plugin": {
8181
"name": "@react-native-video/drm",
82-
"version": "7.0.0-alpha.11",
82+
"version": "7.0.0-beta.0",
8383
"devDependencies": {
8484
"@react-native/babel-preset": "0.79.2",
8585
"@release-it/conventional-changelog": "^9.0.2",
@@ -88,12 +88,12 @@
8888
"eslint": "^8.51.0",
8989
"eslint-config-prettier": "9.0.0",
9090
"eslint-plugin-prettier": "^5.0.1",
91-
"nitrogen": "^0.30.0",
91+
"nitrogen": "^0.31.0",
9292
"prettier": "^3.0.3",
9393
"react": "18.3.1",
9494
"react-native": "^0.77.0",
9595
"react-native-builder-bob": "^0.40.13",
96-
"react-native-nitro-modules": "^0.30.0",
96+
"react-native-nitro-modules": "^0.31.0",
9797
"react-native-video": "*",
9898
"release-it": "^17.10.0",
9999
"typescript": "^5.8.3",
@@ -107,7 +107,7 @@
107107
},
108108
"packages/react-native-video": {
109109
"name": "react-native-video",
110-
"version": "7.0.0-alpha.12",
110+
"version": "7.0.0-beta.0",
111111
"devDependencies": {
112112
"@expo/config-plugins": "^10.0.2",
113113
"@react-native/eslint-config": "^0.77.0",
@@ -116,12 +116,12 @@
116116
"eslint": "^8.51.0",
117117
"eslint-config-prettier": "^9.0.0",
118118
"eslint-plugin-prettier": "^5.0.1",
119-
"nitrogen": "^0.30.0",
119+
"nitrogen": "^0.31.0",
120120
"prettier": "^3.0.3",
121121
"react": "18.3.1",
122122
"react-native": "^0.77.0",
123123
"react-native-builder-bob": "^0.40.0",
124-
"react-native-nitro-modules": "^0.30.0",
124+
"react-native-nitro-modules": "^0.31.0",
125125
"typescript": "^5.2.2",
126126
},
127127
"peerDependencies": {
@@ -2686,7 +2686,7 @@
26862686

26872687
"new-github-release-url": ["[email protected]", "", { "dependencies": { "type-fest": "^2.5.1" } }, "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ=="],
26882688

2689-
"nitrogen": ["nitrogen@0.30.1", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.30.1", "ts-morph": "^27.0.0", "yargs": "^18.0.0", "zod": "^4.0.5" }, "bin": { "nitrogen": "lib/index.js" } }, "sha512-Ls4gahvOxcI2WXyhimHinv4LOujbyXir8bE4hyhqG8vAV5spEcDi0F4nZ0oiTERAnfN/rq1Lskx+hc7Wrl5O+g=="],
2689+
"nitrogen": ["nitrogen@0.31.10", "", { "dependencies": { "chalk": "^5.3.0", "react-native-nitro-modules": "^0.31.10", "ts-morph": "^27.0.0", "yargs": "^18.0.0", "zod": "^4.0.5" }, "bin": { "nitrogen": "lib/index.js" } }, "sha512-Z77c1lj4IeyCigxiO59fW4fnHgfvOZvksTTwfESAJBnHG2DnS28VQ2oCAWL+fPIEvMozLFi+cRyTQu63eJMCSA=="],
26902690

26912691
"no-case": ["[email protected]", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="],
26922692

@@ -3066,7 +3066,7 @@
30663066

30673067
"react-native-monorepo-config": ["[email protected]", "", { "dependencies": { "escape-string-regexp": "^5.0.0", "fast-glob": "^3.3.3" } }, "sha512-v0rlaLZiCUg95Mpw6xNRQce5k9yio0qscKjNQaPtFYMNL75YugS2UPUItIPLIRbZubK+s2/LRzBjX+mdyUgh4g=="],
30683068

3069-
"react-native-nitro-modules": ["react-native-nitro-modules@0.30.1", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-/m1kIUx4qQonqauVLn/DdkXFTKQI180VUJz7G2P/4Jab3NfUqdrFg6ixpf9bH1YXsXb92hK/8epTgl0B8OPxfw=="],
3069+
"react-native-nitro-modules": ["react-native-nitro-modules@0.31.10", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-hcvjTu9YJE9fMmnAUvhG8CxvYLpOuMQ/2eyi/S6GyrecezF6Rmk/uRQEL6v09BRFWA/xRVZNQVulQPS+2HS3mQ=="],
30703070

30713071
"react-native-video": ["react-native-video@workspace:packages/react-native-video"],
30723072

example/ios/Podfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PODS:
88
- hermes-engine (0.77.3):
99
- hermes-engine/Pre-built (= 0.77.3)
1010
- hermes-engine/Pre-built (0.77.3)
11-
- NitroModules (0.30.1):
11+
- NitroModules (0.31.10):
1212
- DoubleConversion
1313
- glog
1414
- hermes-engine
@@ -1565,7 +1565,7 @@ PODS:
15651565
- React-logger (= 0.77.3)
15661566
- React-perflogger (= 0.77.3)
15671567
- React-utils (= 0.77.3)
1568-
- ReactNativeVideo (7.0.0-alpha.11):
1568+
- ReactNativeVideo (7.0.0-beta.0):
15691569
- DoubleConversion
15701570
- glog
15711571
- hermes-engine
@@ -1587,7 +1587,7 @@ PODS:
15871587
- ReactCommon/turbomodule/bridging
15881588
- ReactCommon/turbomodule/core
15891589
- Yoga
1590-
- ReactNativeVideoDrm (7.0.0-alpha.11):
1590+
- ReactNativeVideoDrm (7.0.0-beta.0):
15911591
- DoubleConversion
15921592
- glog
15931593
- hermes-engine
@@ -1844,7 +1844,7 @@ SPEC CHECKSUMS:
18441844
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
18451845
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
18461846
hermes-engine: b2187dbe13edb0db8fcb2a93a69c1987a30d98a4
1847-
NitroModules: eac3d2deb32a5b72ef76210e735dd80bde02f472
1847+
NitroModules: 72332b5857c49f2ee0b5390d4aa00fb91db17df7
18481848
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
18491849
RCTDeprecation: 6ee92578d332db1d4e03267d3ae98bcf8b780863
18501850
RCTRequired: 5b3da0e0f91fddda935574b81748c3e3d3649ee7
@@ -1904,8 +1904,8 @@ SPEC CHECKSUMS:
19041904
ReactAppDependencyProvider: 31015410a4a53b9fd0a908ad4d6e3e2b9a25086a
19051905
ReactCodegen: 53316394e985ded1babc7f143c90c77d2bb1b43c
19061906
ReactCommon: bf4612cba0fa356b529385029f470d5529dddde4
1907-
ReactNativeVideo: d6536278408a2518bf15b8f0b8fb066b3c824065
1908-
ReactNativeVideoDrm: 4316a2f9e2ba34ed83de3c70fd37ab985568f948
1907+
ReactNativeVideo: 5a5e609057e980e9ea2736914377804358c53ae9
1908+
ReactNativeVideoDrm: 4f266c3b018170319ed16bc511218c0d411358d5
19091909
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
19101910
Yoga: 92f3bb322c40a86b7233b815854730442e01b8c4
19111911

example/ios/VideoExample.xcodeproj/project.pbxproj

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
/* Begin PBXBuildFile section */
1010
00E356F31AD99517003FC87E /* VideoExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* VideoExampleTests.m */; };
11-
0C80B921A6F3F58F76C31292 /* libPods-VideoExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-VideoExample.a */; };
1211
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1312
816A0BB965C7D616166E4A50 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
1413
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
14+
9B33EFC63F107D31293DC837 /* libPods-VideoExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EC879E2D9A5E3666772BB43B /* libPods-VideoExample.a */; };
1515
E24C673A2DA45E9200FB6B41 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E24C67392DA45E9200FB6B41 /* AppDelegate.swift */; };
1616
/* End PBXBuildFile section */
1717

@@ -29,16 +29,16 @@
2929
00E356EE1AD99517003FC87E /* VideoExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VideoExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3030
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3131
00E356F21AD99517003FC87E /* VideoExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoExampleTests.m; sourceTree = "<group>"; };
32+
1296B1F9CB9A72FBF202C0EA /* Pods-VideoExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoExample.debug.xcconfig"; path = "Target Support Files/Pods-VideoExample/Pods-VideoExample.debug.xcconfig"; sourceTree = "<group>"; };
3233
13B07F961A680F5B00A75B9A /* VideoExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
3334
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VideoExample/Images.xcassets; sourceTree = "<group>"; };
3435
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VideoExample/Info.plist; sourceTree = "<group>"; };
3536
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = VideoExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
36-
3B4392A12AC88292D35C810B /* Pods-VideoExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoExample.debug.xcconfig"; path = "Target Support Files/Pods-VideoExample/Pods-VideoExample.debug.xcconfig"; sourceTree = "<group>"; };
37-
5709B34CF0A7D63546082F79 /* Pods-VideoExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoExample.release.xcconfig"; path = "Target Support Files/Pods-VideoExample/Pods-VideoExample.release.xcconfig"; sourceTree = "<group>"; };
38-
5DCACB8F33CDC322A6C60F78 /* libPods-VideoExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VideoExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3937
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = VideoExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
38+
AAFF36D6DEC049CEB9D865D8 /* Pods-VideoExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoExample.release.xcconfig"; path = "Target Support Files/Pods-VideoExample/Pods-VideoExample.release.xcconfig"; sourceTree = "<group>"; };
4039
E24C67342DA4538300FB6B41 /* VideoExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VideoExample-Bridging-Header.h"; sourceTree = "<group>"; };
4140
E24C67392DA45E9200FB6B41 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = VideoExample/AppDelegate.swift; sourceTree = "<group>"; };
41+
EC879E2D9A5E3666772BB43B /* libPods-VideoExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VideoExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4242
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
4343
/* End PBXFileReference section */
4444

@@ -54,7 +54,7 @@
5454
isa = PBXFrameworksBuildPhase;
5555
buildActionMask = 2147483647;
5656
files = (
57-
0C80B921A6F3F58F76C31292 /* libPods-VideoExample.a in Frameworks */,
57+
9B33EFC63F107D31293DC837 /* libPods-VideoExample.a in Frameworks */,
5858
);
5959
runOnlyForDeploymentPostprocessing = 0;
6060
};
@@ -95,7 +95,7 @@
9595
isa = PBXGroup;
9696
children = (
9797
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
98-
5DCACB8F33CDC322A6C60F78 /* libPods-VideoExample.a */,
98+
EC879E2D9A5E3666772BB43B /* libPods-VideoExample.a */,
9999
);
100100
name = Frameworks;
101101
sourceTree = "<group>";
@@ -134,8 +134,8 @@
134134
BBD78D7AC51CEA395F1C20DB /* Pods */ = {
135135
isa = PBXGroup;
136136
children = (
137-
3B4392A12AC88292D35C810B /* Pods-VideoExample.debug.xcconfig */,
138-
5709B34CF0A7D63546082F79 /* Pods-VideoExample.release.xcconfig */,
137+
1296B1F9CB9A72FBF202C0EA /* Pods-VideoExample.debug.xcconfig */,
138+
AAFF36D6DEC049CEB9D865D8 /* Pods-VideoExample.release.xcconfig */,
139139
);
140140
path = Pods;
141141
sourceTree = "<group>";
@@ -165,13 +165,13 @@
165165
isa = PBXNativeTarget;
166166
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VideoExample" */;
167167
buildPhases = (
168-
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
168+
FD3671B4534E587DE7FC3AE1 /* [CP] Check Pods Manifest.lock */,
169169
13B07F871A680F5B00A75B9A /* Sources */,
170170
13B07F8C1A680F5B00A75B9A /* Frameworks */,
171171
13B07F8E1A680F5B00A75B9A /* Resources */,
172172
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
173-
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
174-
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
173+
6075DF6F545CCB0D1B44F807 /* [CP] Embed Pods Frameworks */,
174+
5C23AE340DBC4431B262FF5D /* [CP] Copy Pods Resources */,
175175
);
176176
buildRules = (
177177
);
@@ -255,7 +255,24 @@
255255
shellPath = /bin/sh;
256256
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
257257
};
258-
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
258+
5C23AE340DBC4431B262FF5D /* [CP] Copy Pods Resources */ = {
259+
isa = PBXShellScriptBuildPhase;
260+
buildActionMask = 2147483647;
261+
files = (
262+
);
263+
inputFileListPaths = (
264+
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-input-files.xcfilelist",
265+
);
266+
name = "[CP] Copy Pods Resources";
267+
outputFileListPaths = (
268+
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-output-files.xcfilelist",
269+
);
270+
runOnlyForDeploymentPostprocessing = 0;
271+
shellPath = /bin/sh;
272+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources.sh\"\n";
273+
showEnvVarsInLog = 0;
274+
};
275+
6075DF6F545CCB0D1B44F807 /* [CP] Embed Pods Frameworks */ = {
259276
isa = PBXShellScriptBuildPhase;
260277
buildActionMask = 2147483647;
261278
files = (
@@ -272,7 +289,7 @@
272289
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-frameworks.sh\"\n";
273290
showEnvVarsInLog = 0;
274291
};
275-
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
292+
FD3671B4534E587DE7FC3AE1 /* [CP] Check Pods Manifest.lock */ = {
276293
isa = PBXShellScriptBuildPhase;
277294
buildActionMask = 2147483647;
278295
files = (
@@ -294,23 +311,6 @@
294311
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
295312
showEnvVarsInLog = 0;
296313
};
297-
E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
298-
isa = PBXShellScriptBuildPhase;
299-
buildActionMask = 2147483647;
300-
files = (
301-
);
302-
inputFileListPaths = (
303-
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-input-files.xcfilelist",
304-
);
305-
name = "[CP] Copy Pods Resources";
306-
outputFileListPaths = (
307-
"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources-${CONFIGURATION}-output-files.xcfilelist",
308-
);
309-
runOnlyForDeploymentPostprocessing = 0;
310-
shellPath = /bin/sh;
311-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoExample/Pods-VideoExample-resources.sh\"\n";
312-
showEnvVarsInLog = 0;
313-
};
314314
/* End PBXShellScriptBuildPhase section */
315315

316316
/* Begin PBXSourcesBuildPhase section */
@@ -392,7 +392,7 @@
392392
};
393393
13B07F941A680F5B00A75B9A /* Debug */ = {
394394
isa = XCBuildConfiguration;
395-
baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-VideoExample.debug.xcconfig */;
395+
baseConfigurationReference = 1296B1F9CB9A72FBF202C0EA /* Pods-VideoExample.debug.xcconfig */;
396396
buildSettings = {
397397
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
398398
CLANG_ENABLE_MODULES = YES;
@@ -423,7 +423,7 @@
423423
};
424424
13B07F951A680F5B00A75B9A /* Release */ = {
425425
isa = XCBuildConfiguration;
426-
baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-VideoExample.release.xcconfig */;
426+
baseConfigurationReference = AAFF36D6DEC049CEB9D865D8 /* Pods-VideoExample.release.xcconfig */;
427427
buildSettings = {
428428
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
429429
CLANG_ENABLE_MODULES = YES;

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@react-native-community/slider": "^4.5.6",
1616
"react": "18.3.1",
1717
"react-native": "^0.77.0",
18-
"react-native-nitro-modules": "^0.30.0",
18+
"react-native-nitro-modules": "^0.31.0",
1919
"react-native-video": "*",
2020
"@react-native-video/drm": "*"
2121
},

example/patches/react-native-nitro-modules+0.30.1.patch renamed to example/patches/react-native-nitro-modules+0.31.10.patch

File renamed without changes.

packages/drm-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272
"eslint": "^8.51.0",
7373
"eslint-config-prettier": "9.0.0",
7474
"eslint-plugin-prettier": "^5.0.1",
75-
"nitrogen": "^0.30.0",
75+
"nitrogen": "^0.31.0",
7676
"prettier": "^3.0.3",
7777
"react": "18.3.1",
7878
"react-native": "^0.77.0",
7979
"react-native-builder-bob": "^0.40.13",
80-
"react-native-nitro-modules": "^0.30.0",
80+
"react-native-nitro-modules": "^0.31.0",
8181
"release-it": "^17.10.0",
8282
"typescript": "^5.8.3",
8383
"react-native-video": "*"

packages/react-native-video/android/src/main/java/com/twg/video/core/player/OnAudioFocusChangedListener.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
package com.twg.video.core.player
22

3-
import android.content.IntentFilter
43
import android.media.AudioManager
5-
import androidx.core.content.ContextCompat
6-
import com.margelo.nitro.video.HybridVideoPlayerEventEmitterSpec
4+
import com.margelo.nitro.video.HybridVideoPlayerEventEmitter
75

86
// TODO: We should make VideoFocusManager that will track focus globally for now lets just do simple listener
97
class OnAudioFocusChangedListener : AudioManager.OnAudioFocusChangeListener {
10-
private var eventEmitter: HybridVideoPlayerEventEmitterSpec? = null
8+
private var eventEmitter: HybridVideoPlayerEventEmitter? = null
119

1210
override fun onAudioFocusChange(focusChange: Int) {
1311
when (focusChange) {
14-
AudioManager.AUDIOFOCUS_GAIN -> eventEmitter?.onAudioFocusChange?.invoke(true)
15-
AudioManager.AUDIOFOCUS_LOSS -> eventEmitter?.onAudioFocusChange?.invoke(false)
16-
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> eventEmitter?.onAudioFocusChange?.invoke(false)
12+
AudioManager.AUDIOFOCUS_GAIN -> eventEmitter?.onAudioFocusChange(true)
13+
AudioManager.AUDIOFOCUS_LOSS -> eventEmitter?.onAudioFocusChange(false)
14+
AudioManager.AUDIOFOCUS_LOSS_TRANSIENT -> eventEmitter?.onAudioFocusChange(false)
1715
}
1816
}
1917

20-
fun setEventEmitter(eventEmitter: HybridVideoPlayerEventEmitterSpec) {
18+
fun setEventEmitter(eventEmitter: HybridVideoPlayerEventEmitter) {
2119
this.eventEmitter = eventEmitter
2220
}
2321

packages/react-native-video/android/src/main/java/com/twg/video/core/recivers/AudioBecomingNoisyReceiver.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ import android.content.IntentFilter
77
import android.media.AudioManager
88
import androidx.core.content.ContextCompat
99
import com.margelo.nitro.NitroModules
10-
import com.margelo.nitro.video.HybridVideoPlayerEventEmitterSpec
10+
import com.margelo.nitro.video.HybridVideoPlayerEventEmitter
1111
import com.twg.video.core.LibraryError
1212

1313
class AudioBecomingNoisyReceiver() : BroadcastReceiver() {
14-
private var eventEmitter: HybridVideoPlayerEventEmitterSpec? = null
14+
private var eventEmitter: HybridVideoPlayerEventEmitter? = null
1515

1616
override fun onReceive(context: Context?, intent: Intent?) {
1717
if (intent?.action == AudioManager.ACTION_AUDIO_BECOMING_NOISY) {
18-
eventEmitter?.onAudioBecomingNoisy?.invoke()
18+
eventEmitter?.onAudioBecomingNoisy()
1919
}
2020
}
2121

22-
fun setEventEmitter(eventEmitter: HybridVideoPlayerEventEmitterSpec) {
22+
fun setEventEmitter(eventEmitter: HybridVideoPlayerEventEmitter) {
2323
val context = NitroModules.applicationContext ?: throw LibraryError.ApplicationContextNotFound
2424

2525
this.eventEmitter = eventEmitter

0 commit comments

Comments
 (0)