@alirezahosseini/sibtorsh-player 0.3.9 → 0.3.10

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 (2) hide show
  1. package/README.md +124 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -74,17 +74,15 @@ A modern, responsive, and TypeScript-first video player for React with HLS suppo
74
74
 
75
75
  ---
76
76
 
77
- ## Installation
77
+ # Installation
78
78
 
79
- Using npm:
79
+ Install the package:
80
80
 
81
81
  ```bash
82
82
  npm install @alirezahosseini/sibtorsh-player
83
83
  ```
84
84
 
85
- ### Peer Dependencies
86
-
87
- Your project must include React and React DOM:
85
+ Install the required peer dependencies if they are not already available:
88
86
 
89
87
  ```bash
90
88
  npm install react react-dom
@@ -92,6 +90,127 @@ npm install react react-dom
92
90
 
93
91
  ---
94
92
 
93
+ ## Tailwind CSS 4
94
+
95
+ If your project uses **Tailwind CSS v4**, import the default stylesheet:
96
+
97
+ ```tsx
98
+ import VideoPlayer from "@alirezahosseini/sibtorsh-player";
99
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.css";
100
+ ```
101
+
102
+ Example:
103
+
104
+ ```tsx
105
+ import VideoPlayer from "@alirezahosseini/sibtorsh-player";
106
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.css";
107
+
108
+ export default function App() {
109
+ return (
110
+ <div style={{ width: "100%", aspectRatio: "16 / 9" }}>
111
+ <VideoPlayer
112
+ src="https://example.com/master.m3u8"
113
+ poster="https://example.com/poster.jpg"
114
+ title="Sample Video"
115
+ />
116
+ </div>
117
+ );
118
+ }
119
+ ```
120
+
121
+ ---
122
+
123
+ ## Tailwind CSS 3
124
+
125
+ If your project uses **Tailwind CSS v3**, use the compatibility stylesheet instead:
126
+
127
+ ```tsx
128
+ import VideoPlayer from "@alirezahosseini/sibtorsh-player";
129
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.v3.css";
130
+ ```
131
+
132
+ Example:
133
+
134
+ ```tsx
135
+ import VideoPlayer from "@alirezahosseini/sibtorsh-player";
136
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.v3.css";
137
+
138
+ export default function App() {
139
+ return (
140
+ <div style={{ width: "100%", aspectRatio: "16 / 9" }}>
141
+ <VideoPlayer
142
+ src="https://example.com/master.m3u8"
143
+ poster="https://example.com/poster.jpg"
144
+ title="Sample Video"
145
+ />
146
+ </div>
147
+ );
148
+ }
149
+ ```
150
+
151
+ > **Note**
152
+ >
153
+ > The Tailwind CSS 3 build includes compatibility fixes for Tailwind v3 and does not include Tailwind v4 specific styles.
154
+
155
+ ---
156
+
157
+ ## Projects Without Tailwind CSS
158
+
159
+ Tailwind CSS is **not required**.
160
+
161
+ Simply import the default stylesheet:
162
+
163
+ ```tsx
164
+ import VideoPlayer from "@alirezahosseini/sibtorsh-player";
165
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.css";
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Check Your Tailwind Version
171
+
172
+ If you're not sure which Tailwind version your project uses:
173
+
174
+ ```bash
175
+ npm ls tailwindcss
176
+ ```
177
+
178
+ Example output:
179
+
180
+ Tailwind CSS 3
181
+
182
+ ```text
183
+ tailwindcss@3.x.x
184
+ ```
185
+
186
+ Tailwind CSS 4
187
+
188
+ ```text
189
+ tailwindcss@4.x.x
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Important
195
+
196
+ Import **only one** stylesheet.
197
+
198
+ ✅ Tailwind CSS 4
199
+
200
+ ```tsx
201
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.css";
202
+ ```
203
+
204
+ ✅ Tailwind CSS 3
205
+
206
+ ```tsx
207
+ import "@alirezahosseini/sibtorsh-player/dist/sibtorsh-player.v3.css";
208
+ ```
209
+
210
+ ❌ Never import both files together.
211
+
212
+ ---
213
+
95
214
  ## Quick Start
96
215
 
97
216
  Import the player component and its stylesheet:
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.9",
6
+ "version": "0.3.10",
7
7
  "type": "module",
8
8
  "types": "dist/index.d.ts",
9
9
  "main": "dist/sibtorsh-player.umd.js",