@wereform/pkgm-video 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -1,24 +1,221 @@
1
- # @begenone/pkgm-video
1
+ # @wereform/pkgm-video
2
2
 
3
- This package manages **video-related logic** in the BEGENONE app.
3
+ Reusable video UI components and layouts for the WeReform / BEGENONE platform.
4
4
 
5
- ## Overview
5
+ This package provides video-centric building blocks including thumbnails, video players, card layouts, and full video view layouts. It is designed for mobile-first experiences using React Native and Expo, and composes cleanly with shared UI primitives from the WeReform ecosystem.
6
6
 
7
- Everything that involves videos — uploading, displaying, formatting, and retrieving metadata — is handled here.
7
+ ---
8
8
 
9
- ## Features
9
+ ## Install
10
10
 
11
- - 📦 Fetch video lists (feeds, channel-specific, trending)
12
- - 📹 Display video player with metadata
13
- - ⏱ Duration, title, and preview management
14
- - 🧠 Handles video encoding status and thumbnail fallback
11
+ ```bash
12
+ npm install @wereform/pkgm-video
13
+ # or
14
+ yarn add @wereform/pkgm-video
15
+ # or
16
+ pnpm add @wereform/pkgm-video
17
+ ```
15
18
 
16
- ## Usage
19
+ ---
17
20
 
18
- Any screen that shows videos — including feeds, Shorts, and channel pages — imports logic or components from this package.
21
+ ## What this package gives you
19
22
 
20
- ## Tech Stack
23
+ - Video UI components:
21
24
 
22
- - Axios for API calls
23
- - React Native Video or Expo AV
24
- - Shared utilities from `@begenone/pkgm-shared`
25
+ - Video thumbnail renderer
26
+ - Auto-playing video player
27
+ - Horizontal and vertical video cards
28
+
29
+ - Video layouts:
30
+
31
+ - Full video view layout with metadata and interactions
32
+ - Scrollable suggested videos list
33
+
34
+ - Built for:
35
+
36
+ - React Native / Expo
37
+ - Video-first feeds and detail pages
38
+ - Composition with channel, menu, and shared UI packages
39
+
40
+ ---
41
+
42
+ ## Exports
43
+
44
+ From `@wereform/pkgm-video` you can import:
45
+
46
+ ```ts
47
+ import {
48
+ Thumbnail,
49
+ VideoPlayer,
50
+ VideoCardLayout,
51
+ VideoCardHorizontalLayout,
52
+ VideoViewLayout,
53
+ } from "@wereform/pkgm-video";
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Core components
59
+
60
+ ## Thumbnail
61
+
62
+ Renders a responsive 16:9 video thumbnail.
63
+
64
+ ### Props
65
+
66
+ ```ts
67
+ Thumbnail({
68
+ thumbnailURL,
69
+ thumbHeight,
70
+ });
71
+ ```
72
+
73
+ - `thumbnailURL` Thumbnail image URL
74
+ - `thumbHeight` Height of the thumbnail container
75
+
76
+ ---
77
+
78
+ ## VideoPlayer
79
+
80
+ Auto-playing, looping video player built on `expo-video`.
81
+
82
+ ### Props
83
+
84
+ ```ts
85
+ VideoPlayer({
86
+ videoSource,
87
+ });
88
+ ```
89
+
90
+ - Automatically plays when screen is focused
91
+ - Pauses when screen loses focus
92
+ - Supports picture-in-picture mode
93
+ - Maintains a 16:9 aspect ratio
94
+
95
+ ---
96
+
97
+ ## VideoCardHorizontalLayout
98
+
99
+ Compact horizontal video card used in lists and side feeds.
100
+
101
+ ### Props
102
+
103
+ ```ts
104
+ VideoCardHorizontalLayout({
105
+ timeAgo,
106
+ viewsText,
107
+ titleText,
108
+ contentThumbUrl,
109
+ navigateToVideo,
110
+ });
111
+ ```
112
+
113
+ - Designed for dense lists
114
+ - Clickable to navigate to video detail view
115
+
116
+ ---
117
+
118
+ ## VideoCardLayout
119
+
120
+ Standard vertical video card with thumbnail, title, channel info, and metadata.
121
+
122
+ ### Props
123
+
124
+ ```ts
125
+ VideoCardLayout({
126
+ timeAgo,
127
+ viewsText,
128
+ titleText,
129
+ userNameText,
130
+ contentThumbUrl,
131
+ channelLogo,
132
+ containerStyles,
133
+ dateViewsContainerStyle,
134
+ userImageStyles,
135
+ titleNameContainerStyles,
136
+ userNameTextStyles,
137
+ titleTextStyles,
138
+ thumbnailImageStyles,
139
+ customMetaDataStyles,
140
+ navigateToVideo,
141
+ });
142
+ ```
143
+
144
+ - Highly customizable via style overrides
145
+ - Used across feeds and suggested video sections
146
+
147
+ ---
148
+
149
+ ## VideoViewLayout
150
+
151
+ Full video detail layout including player, title, interactions, channel metadata, and suggested videos.
152
+
153
+ ### Props
154
+
155
+ ```ts
156
+ VideoViewLayout({
157
+ videoSource,
158
+ CustomizedTitleText,
159
+ MenuChannelMetaTimeAgo,
160
+ MenuChannelMetaViews,
161
+ MenuChannelMetaUserName,
162
+ MenuChannelMetaSubCount,
163
+ MenuChannelMetaChannelLogo,
164
+ suggestedVideos,
165
+ });
166
+ ```
167
+
168
+ - Renders the active video at the top
169
+ - Displays interaction controls
170
+ - Shows channel metadata
171
+ - Maps and renders suggested videos below
172
+
173
+ ---
174
+
175
+ ## Typical usage
176
+
177
+ ```ts
178
+ <VideoViewLayout
179
+ videoSource={{ uri: videoUrl }}
180
+ CustomizedTitleText="Video title"
181
+ MenuChannelMetaUserName="WeReform"
182
+ MenuChannelMetaSubCount="542,000"
183
+ suggestedVideos={videos}
184
+ />
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Design philosophy
190
+
191
+ - UI-only package
192
+ - No data fetching or API calls
193
+ - Video lifecycle handled at the layout level
194
+ - Composable with shared menu and channel components
195
+ - Optimized for mobile performance and readability
196
+
197
+ ---
198
+
199
+ ## License
200
+
201
+ MIT License
202
+
203
+ Copyright (c) 2025 WeReform / BEGENONE
204
+
205
+ Permission is hereby granted, free of charge, to any person obtaining a copy
206
+ of this software and associated documentation files (the “Software”), to deal
207
+ in the Software without restriction, including without limitation the rights
208
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
209
+ copies of the Software, and to permit persons to whom the Software is
210
+ furnished to do so, subject to the following conditions:
211
+
212
+ The above copyright notice and this permission notice shall be included in
213
+ all copies or substantial portions of the Software.
214
+
215
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
216
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
217
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
218
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
219
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
220
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
221
+ THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wereform/pkgm-video",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "build": "babel src --out-dir dist --extensions .js,.jsx"
@@ -1,14 +0,0 @@
1
- import { View, Text } from "react-native";
2
- import { SampleButton } from "@wereform/pkgm-shared";
3
-
4
- export const VideoTestScreen = () => {
5
- return (
6
- <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
7
- <Text>Video Test Screen</Text>
8
- <SampleButton
9
- title="Press From Shared!"
10
- onPress={() => alert("Works!")}
11
- />
12
- </View>
13
- );
14
- };
File without changes