react-native-tpstreams 0.1.0

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.
Files changed (57) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +49 -0
  3. package/Tpstreams.podspec +42 -0
  4. package/android/build.gradle +122 -0
  5. package/android/generated/java/com/tpstreams/NativeTpstreamsSpec.java +37 -0
  6. package/android/generated/jni/CMakeLists.txt +36 -0
  7. package/android/generated/jni/RNTpstreamsSpec-generated.cpp +32 -0
  8. package/android/generated/jni/RNTpstreamsSpec.h +31 -0
  9. package/android/generated/jni/react/renderer/components/RNTpstreamsSpec/RNTpstreamsSpecJSI-generated.cpp +28 -0
  10. package/android/generated/jni/react/renderer/components/RNTpstreamsSpec/RNTpstreamsSpecJSI.h +71 -0
  11. package/android/gradle.properties +5 -0
  12. package/android/src/main/AndroidManifest.xml +3 -0
  13. package/android/src/main/AndroidManifestNew.xml +2 -0
  14. package/android/src/main/java/com/tpstreams/FragmentModule.kt +183 -0
  15. package/android/src/main/java/com/tpstreams/PlayerFragment.kt +91 -0
  16. package/android/src/main/java/com/tpstreams/TpStreamsPlayerView.kt +45 -0
  17. package/android/src/main/java/com/tpstreams/TpStreamsPlayerViewManager.kt +29 -0
  18. package/android/src/main/java/com/tpstreams/TpstreamsModule.kt +25 -0
  19. package/android/src/main/java/com/tpstreams/TpstreamsPackage.kt +16 -0
  20. package/android/src/main/res/layout/fragment_player.xml +29 -0
  21. package/ios/Tpstreams.h +6 -0
  22. package/ios/Tpstreams.mm +18 -0
  23. package/ios/generated/RNTpstreamsSpec/RNTpstreamsSpec-generated.mm +39 -0
  24. package/ios/generated/RNTpstreamsSpec/RNTpstreamsSpec.h +63 -0
  25. package/ios/generated/RNTpstreamsSpecJSI-generated.cpp +28 -0
  26. package/ios/generated/RNTpstreamsSpecJSI.h +71 -0
  27. package/lib/commonjs/NativeTpstreams.js +9 -0
  28. package/lib/commonjs/NativeTpstreams.js.map +1 -0
  29. package/lib/commonjs/index.js +10 -0
  30. package/lib/commonjs/index.js.map +1 -0
  31. package/lib/commonjs/types.js +2 -0
  32. package/lib/commonjs/types.js.map +1 -0
  33. package/lib/module/NativeTpstreams.js +5 -0
  34. package/lib/module/NativeTpstreams.js.map +1 -0
  35. package/lib/module/index.js +6 -0
  36. package/lib/module/index.js.map +1 -0
  37. package/lib/module/types.js +2 -0
  38. package/lib/module/types.js.map +1 -0
  39. package/lib/typescript/commonjs/package.json +1 -0
  40. package/lib/typescript/commonjs/src/NativeTpstreams.d.ts +7 -0
  41. package/lib/typescript/commonjs/src/NativeTpstreams.d.ts.map +1 -0
  42. package/lib/typescript/commonjs/src/index.d.ts +5 -0
  43. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  44. package/lib/typescript/commonjs/src/types.d.ts +6 -0
  45. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  46. package/lib/typescript/module/package.json +1 -0
  47. package/lib/typescript/module/src/NativeTpstreams.d.ts +7 -0
  48. package/lib/typescript/module/src/NativeTpstreams.d.ts.map +1 -0
  49. package/lib/typescript/module/src/index.d.ts +5 -0
  50. package/lib/typescript/module/src/index.d.ts.map +1 -0
  51. package/lib/typescript/module/src/types.d.ts +6 -0
  52. package/lib/typescript/module/src/types.d.ts.map +1 -0
  53. package/package.json +203 -0
  54. package/react-native.config.js +12 -0
  55. package/src/NativeTpstreams.ts +8 -0
  56. package/src/index.tsx +9 -0
  57. package/src/types.ts +5 -0
package/package.json ADDED
@@ -0,0 +1,203 @@
1
+ {
2
+ "name": "react-native-tpstreams",
3
+ "version": "0.1.0",
4
+ "description": "Video Component for TPStreams",
5
+ "source": "./src/index.tsx",
6
+ "main": "./lib/commonjs/index.js",
7
+ "module": "./lib/module/index.js",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./lib/typescript/module/src/index.d.ts",
12
+ "default": "./lib/module/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
16
+ "default": "./lib/commonjs/index.js"
17
+ }
18
+ }
19
+ },
20
+ "files": [
21
+ "src",
22
+ "lib",
23
+ "android",
24
+ "ios",
25
+ "cpp",
26
+ "*.podspec",
27
+ "react-native.config.js",
28
+ "!ios/build",
29
+ "!android/build",
30
+ "!android/gradle",
31
+ "!android/gradlew",
32
+ "!android/gradlew.bat",
33
+ "!android/local.properties",
34
+ "!**/__tests__",
35
+ "!**/__fixtures__",
36
+ "!**/__mocks__",
37
+ "!**/.*"
38
+ ],
39
+ "scripts": {
40
+ "example": "yarn workspace react-native-tpstreams-example",
41
+ "test": "jest",
42
+ "typecheck": "tsc",
43
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
44
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
45
+ "prepare": "bob build",
46
+ "release": "release-it"
47
+ },
48
+ "keywords": [
49
+ "react-native",
50
+ "ios",
51
+ "android"
52
+ ],
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/testpress/react-native-player-sdk.git"
56
+ },
57
+ "author": "Bharath <bharath@testpress.in> (https://github.com/bharathwaaj)",
58
+ "license": "MIT",
59
+ "bugs": {
60
+ "url": "https://github.com/testpress/react-native-player-sdk/issues"
61
+ },
62
+ "homepage": "https://github.com/testpress/react-native-player-sdk#readme",
63
+ "publishConfig": {
64
+ "registry": "https://registry.npmjs.org/"
65
+ },
66
+ "devDependencies": {
67
+ "@commitlint/config-conventional": "^17.0.2",
68
+ "@evilmartians/lefthook": "^1.5.0",
69
+ "@react-native-community/cli": "15.0.1",
70
+ "@react-native/eslint-config": "^0.73.1",
71
+ "@release-it/conventional-changelog": "^9.0.2",
72
+ "@types/jest": "^29.5.5",
73
+ "@types/react": "^18.2.44",
74
+ "commitlint": "^17.0.2",
75
+ "del-cli": "^5.1.0",
76
+ "eslint": "^8.51.0",
77
+ "eslint-config-prettier": "^9.0.0",
78
+ "eslint-plugin-prettier": "^5.0.1",
79
+ "jest": "^29.7.0",
80
+ "prettier": "^3.0.3",
81
+ "react": "19.0.0",
82
+ "react-native": "0.78.0",
83
+ "react-native-builder-bob": "^0.37.0",
84
+ "release-it": "^17.10.0",
85
+ "turbo": "^1.10.7",
86
+ "typescript": "^5.2.2"
87
+ },
88
+ "resolutions": {
89
+ "@types/react": "^18.2.44"
90
+ },
91
+ "peerDependencies": {
92
+ "react": "*",
93
+ "react-native": "*"
94
+ },
95
+ "workspaces": [
96
+ "example"
97
+ ],
98
+ "packageManager": "yarn@3.6.1",
99
+ "jest": {
100
+ "preset": "react-native",
101
+ "modulePathIgnorePatterns": [
102
+ "<rootDir>/example/node_modules",
103
+ "<rootDir>/lib/"
104
+ ]
105
+ },
106
+ "commitlint": {
107
+ "extends": [
108
+ "@commitlint/config-conventional"
109
+ ]
110
+ },
111
+ "release-it": {
112
+ "git": {
113
+ "commitMessage": "chore: release ${version}",
114
+ "tagName": "v${version}"
115
+ },
116
+ "npm": {
117
+ "publish": true
118
+ },
119
+ "github": {
120
+ "release": true
121
+ },
122
+ "plugins": {
123
+ "@release-it/conventional-changelog": {
124
+ "preset": "angular"
125
+ }
126
+ }
127
+ },
128
+ "eslintConfig": {
129
+ "root": true,
130
+ "extends": [
131
+ "@react-native",
132
+ "prettier"
133
+ ],
134
+ "rules": {
135
+ "react/react-in-jsx-scope": "off",
136
+ "prettier/prettier": [
137
+ "error",
138
+ {
139
+ "quoteProps": "consistent",
140
+ "singleQuote": true,
141
+ "tabWidth": 2,
142
+ "trailingComma": "es5",
143
+ "useTabs": false
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ "eslintIgnore": [
149
+ "node_modules/",
150
+ "lib/"
151
+ ],
152
+ "prettier": {
153
+ "quoteProps": "consistent",
154
+ "singleQuote": true,
155
+ "tabWidth": 2,
156
+ "trailingComma": "es5",
157
+ "useTabs": false
158
+ },
159
+ "react-native-builder-bob": {
160
+ "source": "src",
161
+ "output": "lib",
162
+ "targets": [
163
+ "codegen",
164
+ [
165
+ "commonjs",
166
+ {
167
+ "esm": true
168
+ }
169
+ ],
170
+ [
171
+ "module",
172
+ {
173
+ "esm": true
174
+ }
175
+ ],
176
+ [
177
+ "typescript",
178
+ {
179
+ "project": "tsconfig.build.json",
180
+ "esm": true
181
+ }
182
+ ]
183
+ ]
184
+ },
185
+ "codegenConfig": {
186
+ "name": "RNTpstreamsSpec",
187
+ "type": "modules",
188
+ "jsSrcsDir": "src",
189
+ "outputDir": {
190
+ "ios": "ios/generated",
191
+ "android": "android/generated"
192
+ },
193
+ "android": {
194
+ "javaPackageName": "com.tpstreams"
195
+ },
196
+ "includesGeneratedCode": true
197
+ },
198
+ "create-react-native-library": {
199
+ "type": "turbo-module",
200
+ "languages": "kotlin-objc",
201
+ "version": "0.48.3"
202
+ }
203
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @type {import('@react-native-community/cli-types').UserDependencyConfig}
3
+ */
4
+ module.exports = {
5
+ dependency: {
6
+ platforms: {
7
+ android: {
8
+ cmakeListsPath: 'generated/jni/CMakeLists.txt',
9
+ },
10
+ },
11
+ },
12
+ };
@@ -0,0 +1,8 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ multiply(a: number, b: number): number;
6
+ }
7
+
8
+ export default TurboModuleRegistry.getEnforcing<Spec>('Tpstreams');
package/src/index.tsx ADDED
@@ -0,0 +1,9 @@
1
+ import type { TpStreamsPlayerProps } from './types';
2
+ import { requireNativeComponent } from 'react-native';
3
+
4
+ const TpStreamsPlayerView = requireNativeComponent<TpStreamsPlayerProps>(
5
+ 'TpStreamsPlayerView'
6
+ );
7
+
8
+ export default TpStreamsPlayerView;
9
+ export type { TpStreamsPlayerProps };
package/src/types.ts ADDED
@@ -0,0 +1,5 @@
1
+ export type TpStreamsPlayerProps = {
2
+ videoId: string;
3
+ accessToken: string;
4
+ style?: import('react-native').ViewStyle;
5
+ };