react-native-tpstreams 1.0.3-debug.3 → 1.0.3-debug.5

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.
@@ -23,13 +23,17 @@ class TPStreamsDownloadModule: RCTEventEmitter, TPStreamsDownloadDelegate {
23
23
  private let downloadManager = TPStreamsDownloadManager.shared
24
24
  private var isListening = false
25
25
  private var tokenDelegate: TokenRequestDelegate?
26
- static var shared: TPStreamsDownloadModule?
27
-
26
+ private static var _shared: TPStreamsDownloadModule?
27
+
28
+ static var shared: TPStreamsDownloadModule? {
29
+ return _shared
30
+ }
31
+
28
32
  override init() {
29
33
  super.init()
34
+ TPStreamsDownloadModule._shared = self
30
35
  downloadManager.setTPStreamsDownloadDelegate(tpStreamsDownloadDelegate: self)
31
- TPStreamsDownloadModule.shared = self
32
- print("TPStreamsDownloadModule initialized")
36
+ print("DownloadModule: init done")
33
37
  print("Downloadmanager delegates are set")
34
38
  }
35
39
 
@@ -19,7 +19,7 @@ class TPStreamsModule: NSObject {
19
19
  }
20
20
 
21
21
  private func initializeDownloadModule() {
22
- let _ = TPStreamsDownloadModule()
22
+ _ = TPStreamsDownloadModule.shared
23
23
  }
24
24
 
25
25
  @objc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tpstreams",
3
- "version": "1.0.3-debug.3",
3
+ "version": "1.0.3-debug.5",
4
4
  "description": "Video component for TPStreams",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",