react-native-tpstreams 1.0.3-debug.8 → 1.0.3-debug.9
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 +8 -8
- package/ios/TPStreamsDownloadModule.swift +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,14 +41,14 @@ import { TPStreamsPlayerView } from "react-native-tpstreams";
|
|
|
41
41
|
|
|
42
42
|
| Prop | Type | Required | Description |
|
|
43
43
|
|------|------|----------|-------------|
|
|
44
|
-
| `videoId` | `string` |
|
|
45
|
-
| `accessToken` | `string` |
|
|
46
|
-
| `startAt` | `number` |
|
|
47
|
-
| `shouldAutoPlay` | `boolean` |
|
|
48
|
-
| `showDefaultCaptions` | `boolean` |
|
|
49
|
-
| `enableDownload` | `boolean` |
|
|
50
|
-
| `offlineLicenseExpireTime` | `number` |
|
|
51
|
-
| `downloadMetadata` | `object` |
|
|
44
|
+
| `videoId` | `string` | Yes | Video ID to play |
|
|
45
|
+
| `accessToken` | `string` | Yes | Access token for the video |
|
|
46
|
+
| `startAt` | `number` | No | Start position in seconds (default: 0) |
|
|
47
|
+
| `shouldAutoPlay` | `boolean` | No | Auto-play on load (default: true) |
|
|
48
|
+
| `showDefaultCaptions` | `boolean` | No | Show captions if available (default: false) |
|
|
49
|
+
| `enableDownload` | `boolean` | No | Enable download functionality (default: false) |
|
|
50
|
+
| `offlineLicenseExpireTime` | `number` | No | License expiration in seconds (default: 15 days) |
|
|
51
|
+
| `downloadMetadata` | `object` | No | Custom metadata for downloads |
|
|
52
52
|
|
|
53
53
|
### Player Methods
|
|
54
54
|
|
|
@@ -48,6 +48,7 @@ class TPStreamsDownloadModule: RCTEventEmitter, TPStreamsDownloadDelegate {
|
|
|
48
48
|
@objc
|
|
49
49
|
func addDownloadProgressListener(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
|
|
50
50
|
isListening = true
|
|
51
|
+
notifyDownloadsChange()
|
|
51
52
|
print("TPStreamsDownloadModule addDownloadProgressListener")
|
|
52
53
|
resolve(nil)
|
|
53
54
|
}
|
|
@@ -136,7 +137,6 @@ class TPStreamsDownloadModule: RCTEventEmitter, TPStreamsDownloadDelegate {
|
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
private func notifyDownloadsChange() {
|
|
139
|
-
print("TPStreamsDownloadModule notifyDownloadsChange")
|
|
140
140
|
DispatchQueue.main.async { [weak self] in
|
|
141
141
|
guard let self = self else { return }
|
|
142
142
|
let downloadAssets = self.getAllDownloadItems()
|