react-native-spalla-player 1.0.2 → 1.0.4
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/lib/module/SpallaPlayerViewNativeComponent.js +7 -1
- package/lib/module/SpallaPlayerViewNativeComponent.js.map +1 -1
- package/lib/typescript/src/SpallaPlayerViewNativeComponent.d.ts +10 -8
- package/lib/typescript/src/SpallaPlayerViewNativeComponent.d.ts.map +1 -1
- package/package.json +3 -11
- package/src/SpallaPlayerViewNativeComponent.ts +15 -13
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// NOTE: codegenNativeComponent MUST be imported from RN internals for Fabric.
|
|
4
|
+
// Do not change this import to `from 'react-native'`.
|
|
5
|
+
/* eslint-disable @react-native/no-deep-imports */
|
|
6
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
+
|
|
8
|
+
/* eslint-disable @react-native/no-deep-imports */
|
|
9
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
4
10
|
|
|
5
11
|
// Define a single comprehensive event payload interface
|
|
6
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../src","sources":["SpallaPlayerViewNativeComponent.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["codegenNativeComponent","codegenNativeCommands","Commands","supportedCommands"],"sourceRoot":"../../src","sources":["SpallaPlayerViewNativeComponent.ts"],"mappings":";;AAEA;AACA;AACA;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAE5F;AACA,OAAOC,qBAAqB,MAAM,wDAAwD;;AAE1F;;AAyCA,OAAO,MAAMC,QAAwB,GAAGD,qBAAqB,CAAiB;EAC5EE,iBAAiB,EAAE,CACjB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,oBAAoB,EACpB,SAAS;AAEb,CAAC,CAAC;AAEF,eAAeH,sBAAsB,CAAc,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ViewProps, CodegenTypes, HostComponent } from 'react-native';
|
|
2
2
|
interface PlayerEventPayload {
|
|
3
3
|
event: string;
|
|
4
4
|
time?: CodegenTypes.Double;
|
|
@@ -20,14 +20,16 @@ export interface NativeProps extends ViewProps {
|
|
|
20
20
|
onPlayerEvent?: CodegenTypes.BubblingEventHandler<PlayerEventPayload>;
|
|
21
21
|
}
|
|
22
22
|
export interface NativeCommands {
|
|
23
|
-
play: (viewRef: React.ElementRef<HostComponent<
|
|
24
|
-
pause: (viewRef: React.ElementRef<HostComponent<
|
|
25
|
-
seekTo: (viewRef: React.ElementRef<HostComponent<
|
|
26
|
-
selectSubtitle: (viewRef: React.ElementRef<HostComponent<
|
|
27
|
-
selectPlaybackRate: (viewRef: React.ElementRef<HostComponent<
|
|
28
|
-
unmount: (viewRef: React.ElementRef<HostComponent<
|
|
23
|
+
play: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
24
|
+
pause: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
25
|
+
seekTo: (viewRef: React.ElementRef<HostComponent<NativeProps>>, time: CodegenTypes.Double) => void;
|
|
26
|
+
selectSubtitle: (viewRef: React.ElementRef<HostComponent<NativeProps>>, subtitle: string | null) => void;
|
|
27
|
+
selectPlaybackRate: (viewRef: React.ElementRef<HostComponent<NativeProps>>, rate: CodegenTypes.Float) => void;
|
|
28
|
+
unmount: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
29
29
|
}
|
|
30
30
|
export declare const Commands: NativeCommands;
|
|
31
|
-
declare const _default:
|
|
31
|
+
declare const _default: (props: Omit<NativeProps, "ref"> & {
|
|
32
|
+
ref?: React.Ref<import("react-native").HostInstance>;
|
|
33
|
+
}) => React.ReactNode;
|
|
32
34
|
export default _default;
|
|
33
35
|
//# sourceMappingURL=SpallaPlayerViewNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpallaPlayerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/SpallaPlayerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SpallaPlayerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/SpallaPlayerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAW3E,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,YAAY,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;CACvE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC;IACtE,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC;IACvE,MAAM,EAAE,CACN,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACrD,IAAI,EAAE,YAAY,CAAC,MAAM,KACtB,IAAI,CAAC;IACV,cAAc,EAAE,CACd,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACrD,QAAQ,EAAE,MAAM,GAAG,IAAI,KACpB,IAAI,CAAC;IACV,kBAAkB,EAAE,CAClB,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACrD,IAAI,EAAE,YAAY,CAAC,KAAK,KACrB,IAAI,CAAC;IACV,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,KAAK,IAAI,CAAC;CAC1E;AAED,eAAO,MAAM,QAAQ,EAAE,cASrB,CAAC;;;;AAEH,wBAAuE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-spalla-player",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Spalla Player for React Native",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -111,19 +111,11 @@
|
|
|
111
111
|
]
|
|
112
112
|
},
|
|
113
113
|
"codegenConfig": {
|
|
114
|
-
"name": "
|
|
115
|
-
"type": "
|
|
114
|
+
"name": "SpallaPlayerView",
|
|
115
|
+
"type": "components",
|
|
116
116
|
"jsSrcsDir": "src",
|
|
117
117
|
"android": {
|
|
118
118
|
"javaPackageName": "com.spallaplayer"
|
|
119
|
-
},
|
|
120
|
-
"ios": {
|
|
121
|
-
"componentProvider": {
|
|
122
|
-
"SpallaPlayerView": "SpallaPlayerView"
|
|
123
|
-
},
|
|
124
|
-
"modulesProvider": {
|
|
125
|
-
"SpallaPlayerModule": "SpallaPlayerModule"
|
|
126
|
-
}
|
|
127
119
|
}
|
|
128
120
|
},
|
|
129
121
|
"prettier": {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ViewProps, CodegenTypes, HostComponent } from 'react-native';
|
|
2
|
+
|
|
3
|
+
// NOTE: codegenNativeComponent MUST be imported from RN internals for Fabric.
|
|
4
|
+
// Do not change this import to `from 'react-native'`.
|
|
5
|
+
/* eslint-disable @react-native/no-deep-imports */
|
|
6
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
+
|
|
8
|
+
/* eslint-disable @react-native/no-deep-imports */
|
|
9
|
+
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
8
10
|
|
|
9
11
|
// Define a single comprehensive event payload interface
|
|
10
12
|
interface PlayerEventPayload {
|
|
@@ -30,21 +32,21 @@ export interface NativeProps extends ViewProps {
|
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export interface NativeCommands {
|
|
33
|
-
play: (viewRef: React.ElementRef<HostComponent<
|
|
34
|
-
pause: (viewRef: React.ElementRef<HostComponent<
|
|
35
|
+
play: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
36
|
+
pause: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
35
37
|
seekTo: (
|
|
36
|
-
viewRef: React.ElementRef<HostComponent<
|
|
38
|
+
viewRef: React.ElementRef<HostComponent<NativeProps>>,
|
|
37
39
|
time: CodegenTypes.Double
|
|
38
40
|
) => void;
|
|
39
41
|
selectSubtitle: (
|
|
40
|
-
viewRef: React.ElementRef<HostComponent<
|
|
42
|
+
viewRef: React.ElementRef<HostComponent<NativeProps>>,
|
|
41
43
|
subtitle: string | null
|
|
42
44
|
) => void;
|
|
43
45
|
selectPlaybackRate: (
|
|
44
|
-
viewRef: React.ElementRef<HostComponent<
|
|
46
|
+
viewRef: React.ElementRef<HostComponent<NativeProps>>,
|
|
45
47
|
rate: CodegenTypes.Float
|
|
46
48
|
) => void;
|
|
47
|
-
unmount: (viewRef: React.ElementRef<HostComponent<
|
|
49
|
+
unmount: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => void;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|