react-native-spalla-player 1.0.1 → 1.0.2
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.
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
package com.spallaplayer
|
|
2
2
|
|
|
3
|
-
import com.facebook.react.
|
|
3
|
+
import com.facebook.react.BaseReactPackage
|
|
4
|
+
import com.facebook.react.bridge.ModuleSpec
|
|
4
5
|
import com.facebook.react.bridge.NativeModule
|
|
5
6
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
-
import com.facebook.react.
|
|
7
|
+
import com.facebook.react.module.model.ReactModuleInfo
|
|
8
|
+
import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
7
9
|
import com.spallaplayer.components.RNGoogleCastButtonManager
|
|
8
|
-
import java.util.ArrayList
|
|
9
10
|
|
|
10
|
-
class SpallaPlayerViewPackage :
|
|
11
|
-
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
12
|
-
val viewManagers: MutableList<ViewManager<*, *>> = ArrayList()
|
|
13
|
-
viewManagers.add(SpallaPlayerViewManager())
|
|
14
|
-
viewManagers.add(RNGoogleCastButtonManager())
|
|
15
|
-
return viewManagers
|
|
16
|
-
}
|
|
11
|
+
class SpallaPlayerViewPackage : BaseReactPackage() {
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
override fun getViewManagers(
|
|
14
|
+
reactContext: ReactApplicationContext
|
|
15
|
+
): List<ModuleSpec> =
|
|
16
|
+
listOf(
|
|
17
|
+
ModuleSpec.viewManagerSpec {
|
|
18
|
+
SpallaPlayerViewManager()
|
|
19
|
+
},
|
|
20
|
+
ModuleSpec.viewManagerSpec {
|
|
21
|
+
RNGoogleCastButtonManager()
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
override fun getReactModuleInfoProvider(): ReactModuleInfoProvider =
|
|
26
|
+
ReactModuleInfoProvider {
|
|
27
|
+
mapOf(
|
|
28
|
+
SpallaPlayerModule.REACT_NAME to ReactModuleInfo(
|
|
29
|
+
SpallaPlayerModule.REACT_NAME,
|
|
30
|
+
className = SpallaPlayerModule::class.java.name,
|
|
31
|
+
canOverrideExistingModule = false,
|
|
32
|
+
needsEagerInit = false,
|
|
33
|
+
isCxxModule = false,
|
|
34
|
+
isTurboModule = false
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
}
|
|
22
38
|
|
|
23
39
|
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
|
|
24
40
|
return when (name) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-spalla-player",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Spalla Player for React Native",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
9
|
"source": "./src/index.tsx",
|
|
10
|
+
"import": "./lib/module/index.js",
|
|
10
11
|
"types": "./lib/typescript/src/index.d.ts",
|
|
11
12
|
"default": "./lib/module/index.js"
|
|
12
13
|
},
|