@takeoffmedia/react-native-penthera 0.2.62 → 0.2.63

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.
@@ -42,6 +42,10 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
42
42
  var assetId: MutableList<String> = mutableListOf()
43
43
  private val gson = Gson()
44
44
  var minimumLowBandWidth: Double = 0.00010
45
+ var valueUserId: String = ""
46
+ var valueBackPlaneUrl: String = ""
47
+ var valuePublicKey: String = ""
48
+ var valuePrivateKey: String = ""
45
49
 
46
50
  private val enginePauseObserver: Observers.IEngineObserver = object : EngineObserver() {
47
51
  override fun engineStatusChanged(status: Int) {
@@ -69,22 +73,26 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
69
73
  }
70
74
 
71
75
  fun setup(
72
- userId: String,
73
- backplaneUrl: String,
74
- publicKey: String,
75
- privateKey: String,
76
- promise: Promise,
76
+ userId: String = valueUserId,
77
+ backplaneUrl: String = valueBackPlaneUrl,
78
+ publicKey: String = valuePublicKey,
79
+ privateKey: String = valuePrivateKey,
80
+ promise: Promise? = null
77
81
  ) {
78
82
  val vir = getInstanceVirtuoso()
83
+ valueUserId = userId
84
+ valueBackPlaneUrl = backplaneUrl
85
+ valuePrivateKey = privateKey
86
+ valuePublicKey = publicKey
79
87
 
80
88
  val nameDevice = android.os.Build.MODEL
81
89
 
82
90
  vir.startup(
83
- URL(backplaneUrl),
84
- userId,
85
- nameDevice,
86
- publicKey,
87
- privateKey,
91
+ URL(valueBackPlaneUrl),
92
+ valueUserId,
93
+ nameDevice,
94
+ valuePublicKey,
95
+ valuePrivateKey,
88
96
  object : IPushRegistrationObserver {
89
97
  override fun onServiceAvailabilityResponse(
90
98
  pushService: Int,
@@ -94,12 +102,13 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
94
102
  }
95
103
  }
96
104
  ).let {
97
- promise.resolve("Penthera initialization successfully")
105
+ promise?.resolve("Penthera initialization successfully")
98
106
  }
99
107
 
100
108
  }
101
109
 
102
110
  fun downloadAsset(newItem: String) {
111
+ setup()
103
112
  val data = JSONObject(newItem)
104
113
  val item = data["item"] as JSONObject
105
114
  assetId.add(item["id"].toString())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeoffmedia/react-native-penthera",
3
- "version": "0.2.62",
3
+ "version": "0.2.63",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,104 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Bucket
3
- uuid = "3AE98629-7421-4561-B12C-C06B8B6A3023"
4
- type = "1"
5
- version = "2.0">
6
- <Breakpoints>
7
- <BreakpointProxy
8
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
9
- <BreakpointContent
10
- uuid = "A5D166B0-3C57-4F4D-A845-BDB81498DA0F"
11
- shouldBeEnabled = "No"
12
- ignoreCount = "0"
13
- continueAfterRunningActions = "No"
14
- filePath = "Penthera.swift"
15
- startingColumnNumber = "9223372036854775807"
16
- endingColumnNumber = "9223372036854775807"
17
- startingLineNumber = "18"
18
- endingLineNumber = "18"
19
- landmarkName = "Penthera"
20
- landmarkType = "3">
21
- </BreakpointContent>
22
- </BreakpointProxy>
23
- <BreakpointProxy
24
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
25
- <BreakpointContent
26
- uuid = "5D7AE47B-D5FC-4468-A75B-C414F3F8A58C"
27
- shouldBeEnabled = "No"
28
- ignoreCount = "0"
29
- continueAfterRunningActions = "No"
30
- filePath = "Penthera.swift"
31
- startingColumnNumber = "9223372036854775807"
32
- endingColumnNumber = "9223372036854775807"
33
- startingLineNumber = "25"
34
- endingLineNumber = "25"
35
- landmarkName = "updateStatusInfo()"
36
- landmarkType = "7">
37
- </BreakpointContent>
38
- </BreakpointProxy>
39
- <BreakpointProxy
40
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
41
- <BreakpointContent
42
- uuid = "E3C50B30-46CF-4D56-8C49-C257C70E0ACC"
43
- shouldBeEnabled = "No"
44
- ignoreCount = "0"
45
- continueAfterRunningActions = "No"
46
- filePath = "Penthera.swift"
47
- startingColumnNumber = "9223372036854775807"
48
- endingColumnNumber = "9223372036854775807"
49
- startingLineNumber = "26"
50
- endingLineNumber = "26"
51
- landmarkName = "updateStatusInfo()"
52
- landmarkType = "7">
53
- </BreakpointContent>
54
- </BreakpointProxy>
55
- <BreakpointProxy
56
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
57
- <BreakpointContent
58
- uuid = "75EF43BF-56FF-4727-B372-E1A0EBC02C61"
59
- shouldBeEnabled = "Yes"
60
- ignoreCount = "0"
61
- continueAfterRunningActions = "No"
62
- filePath = "Penthera.swift"
63
- startingColumnNumber = "9223372036854775807"
64
- endingColumnNumber = "9223372036854775807"
65
- startingLineNumber = "101"
66
- endingLineNumber = "101"
67
- landmarkName = "initializeSdk(user:backplaneUrl:publicKey:privateKey:resolve:reject:)"
68
- landmarkType = "7">
69
- </BreakpointContent>
70
- </BreakpointProxy>
71
- <BreakpointProxy
72
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
73
- <BreakpointContent
74
- uuid = "EF36B51B-4FC2-4989-A791-180E3212EFE3"
75
- shouldBeEnabled = "Yes"
76
- ignoreCount = "0"
77
- continueAfterRunningActions = "No"
78
- filePath = "Penthera.swift"
79
- startingColumnNumber = "9223372036854775807"
80
- endingColumnNumber = "9223372036854775807"
81
- startingLineNumber = "149"
82
- endingLineNumber = "149"
83
- landmarkName = "getDownloadedAsset(assetID:)"
84
- landmarkType = "7">
85
- </BreakpointContent>
86
- </BreakpointProxy>
87
- <BreakpointProxy
88
- BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
89
- <BreakpointContent
90
- uuid = "C467C00E-2428-4D24-843A-E7CDF28CB553"
91
- shouldBeEnabled = "Yes"
92
- ignoreCount = "0"
93
- continueAfterRunningActions = "No"
94
- filePath = "Penthera.swift"
95
- startingColumnNumber = "9223372036854775807"
96
- endingColumnNumber = "9223372036854775807"
97
- startingLineNumber = "148"
98
- endingLineNumber = "148"
99
- landmarkName = "getDownloadedAsset(assetID:)"
100
- landmarkType = "7">
101
- </BreakpointContent>
102
- </BreakpointProxy>
103
- </Breakpoints>
104
- </Bucket>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>Penthera.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>