react-native-tpstreams 0.1.12 → 0.1.14

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
@@ -75,7 +75,7 @@ The player component accepts the following props:
75
75
  | `enableDownload` | boolean | No | `true` | Enables or disables video download. |
76
76
  | `autoPlay` | boolean | No | `true` | Controls whether the video should start playing automatically. |
77
77
  | `startAt` | number | No | `0` | Start the video from a particular time (in seconds). |
78
- | `offlineLicenseExpireTime` | number | No | `15` | DRM license expiration time in days. |
78
+ | `offlineLicenseExpireTime` | number | No | `1296000(15 days in seconds)` | DRM license expiration time in seconds. |
79
79
  | `style` | object | No | `{ width: '100%', height: 300 }` | Defines the player’s width and height. |
80
80
 
81
81
  # Player Methods
@@ -217,7 +217,15 @@ subscription.remove();
217
217
  ## Available Events
218
218
 
219
219
  ### onPlaybackStateChanged
220
- Triggered when the playback state changes.
220
+ This event notifies us when the player's playback state changes:
221
+
222
+ | State | Value | Description |
223
+ |--------|-------|------------|
224
+ | `STATE_IDLE` | `1` | The player is idle and not ready to play. |
225
+ | `STATE_BUFFERING` | `2` | The player is buffering (waiting for enough data). |
226
+ | `STATE_READY` | `3` | The player is ready to play. |
227
+ | `STATE_ENDED` | `4` | The playback has finished. |
228
+
221
229
 
222
230
  ```js
223
231
  eventEmitter.addListener('onPlaybackStateChanged', (state) => {
@@ -265,7 +273,8 @@ eventEmitter.addListener('onFullScreenChanged', (isFullscreen) => {
265
273
  ```
266
274
 
267
275
  ### onIsLoadingChanged
268
- Triggered when the player’s loading state changes.
276
+ - `true`: The player is currently loading or buffering new data from the network.
277
+ - `false`: The player has sufficient buffered content and can play without interruption.
269
278
 
270
279
  ```js
271
280
  eventEmitter.addListener('onIsLoadingChanged', (isLoading) => {
@@ -39,7 +39,7 @@ class TpStreamsPlayerViewManager : SimpleViewManager<TpStreamsPlayerView>() {
39
39
 
40
40
  @ReactProp(name = "offlineLicenseExpireTime")
41
41
  fun setOfflineLicenseExpireTime(view: TpStreamsPlayerView, offlineLicenseExpireTime: Int?) {
42
- view.setOfflineLicenseExpireTime(offlineLicenseExpireTime ?: 15)
42
+ view.setOfflineLicenseExpireTime(offlineLicenseExpireTime ?: 60 * 60 * 24 * 15)
43
43
  }
44
44
  }
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tpstreams",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Video Component for TPStreams",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",