@takeoffmedia/react-native-penthera 0.2.36 → 0.2.37
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/android/src/main/java/com/takeoffmediareactnativepenthera/virtuoso/OfflineVideoEngine.kt +22 -22
- package/package.json +1 -1
- package/ios/Penthera.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Penthera.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/Penthera.xcodeproj/project.xcworkspace/xcuserdata/joseguerreroot.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Penthera.xcodeproj/xcuserdata/joseguerreroot.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -104
- package/ios/Penthera.xcodeproj/xcuserdata/joseguerreroot.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
package/android/src/main/java/com/takeoffmediareactnativepenthera/virtuoso/OfflineVideoEngine.kt
CHANGED
|
@@ -39,7 +39,7 @@ import com.facebook.react.bridge.Promise
|
|
|
39
39
|
|
|
40
40
|
class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
lateinit var virtuoso : Virtuoso
|
|
43
43
|
private lateinit var queueObserver: AssetQueueObserver
|
|
44
44
|
|
|
45
45
|
var asset: IAsset? = null
|
|
@@ -56,38 +56,38 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
56
56
|
virtuoso = Virtuoso(context)
|
|
57
57
|
queueObserver = AssetQueueObserver(this)
|
|
58
58
|
onResume()
|
|
59
|
-
return virtuoso
|
|
59
|
+
return virtuoso
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
fun onResume() {
|
|
63
|
-
virtuoso
|
|
64
|
-
virtuoso
|
|
65
|
-
virtuoso
|
|
63
|
+
virtuoso.onResume()
|
|
64
|
+
virtuoso.addObserver(queueObserver)
|
|
65
|
+
virtuoso.addObserver(enginePauseObserver)
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
fun onPause() {
|
|
69
|
-
virtuoso
|
|
70
|
-
virtuoso
|
|
71
|
-
virtuoso
|
|
69
|
+
virtuoso.onPause()
|
|
70
|
+
virtuoso.removeObserver(queueObserver)
|
|
71
|
+
virtuoso.removeObserver(enginePauseObserver)
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
fun setup(
|
|
75
|
-
|
|
75
|
+
userId: String,
|
|
76
76
|
backplaneUrl: String,
|
|
77
77
|
publicKey: String,
|
|
78
78
|
privateKey: String,
|
|
79
79
|
activity: Activity,
|
|
80
80
|
promise: Promise,
|
|
81
|
-
)
|
|
81
|
+
) {
|
|
82
82
|
val backplane = getVirtuoso(activity)
|
|
83
83
|
val status = backplane.backplane?.authenticationStatus
|
|
84
|
+
val nameDevice = android.os.Build.MODEL
|
|
84
85
|
if (status == AuthenticationStatus.NOT_AUTHENTICATED) {
|
|
85
|
-
virtuoso
|
|
86
|
-
URL(backplaneUrl)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
publicKey,//Penthera demo public key. Substitute the correct one.
|
|
86
|
+
virtuoso.startup(
|
|
87
|
+
URL(backplaneUrl),
|
|
88
|
+
userId,
|
|
89
|
+
nameDevice,
|
|
90
|
+
publicKey,
|
|
91
91
|
privateKey,
|
|
92
92
|
object : IPushRegistrationObserver {
|
|
93
93
|
override fun onServiceAvailabilityResponse(
|
|
@@ -117,12 +117,12 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
117
117
|
setClientSideAdSupport(true)
|
|
118
118
|
}.build()
|
|
119
119
|
|
|
120
|
-
virtuoso
|
|
120
|
+
virtuoso.assetManager.createMPDSegmentedAssetAsync(params)
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
fun getDownloads(): String? {
|
|
124
124
|
val completedList = mutableListOf<MutableMap<String, Any>>()
|
|
125
|
-
val cursor = virtuoso
|
|
125
|
+
val cursor = virtuoso.assetManager?.cursor
|
|
126
126
|
val count = cursor?.count
|
|
127
127
|
if( count == 0){
|
|
128
128
|
cursor.close()
|
|
@@ -173,7 +173,7 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
173
173
|
|
|
174
174
|
fun deleteAsset(assetId: String) {
|
|
175
175
|
//load asset if it has already been downloaded
|
|
176
|
-
val list: MutableList<IIdentifier>? = virtuoso
|
|
176
|
+
val list: MutableList<IIdentifier>? = virtuoso.assetManager?.getByAssetId(assetId)
|
|
177
177
|
|
|
178
178
|
list?.let {
|
|
179
179
|
if (it.isNotEmpty())
|
|
@@ -184,7 +184,7 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
184
184
|
asset!!.assetId,
|
|
185
185
|
"test"
|
|
186
186
|
)
|
|
187
|
-
virtuoso
|
|
187
|
+
virtuoso.assetManager?.delete(asset)
|
|
188
188
|
asset = null
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -192,7 +192,7 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
192
192
|
|
|
193
193
|
fun getByAssetId(assetId: String): String? {
|
|
194
194
|
//load asset if it has already been downloaded
|
|
195
|
-
val list: MutableList<IIdentifier>? = virtuoso
|
|
195
|
+
val list: MutableList<IIdentifier>? = virtuoso.assetManager?.getByAssetId(assetId)
|
|
196
196
|
|
|
197
197
|
list?.let {
|
|
198
198
|
if (it.isNotEmpty()) {
|
|
@@ -210,7 +210,7 @@ class OfflineVideoEngine(private val context: ReactApplicationContext) {
|
|
|
210
210
|
fun updateUI() {}
|
|
211
211
|
|
|
212
212
|
fun loadBitmovinSourceManager(assetId: String, nativeId: String): Boolean {
|
|
213
|
-
virtuoso
|
|
213
|
+
virtuoso.assetManager?.getByAssetId(assetId)?.firstOrNull()?.let { asset ->
|
|
214
214
|
val sourceManager = BitmovinSourceManager(context, asset as ISegmentedAsset)
|
|
215
215
|
val sourceItem = sourceManager.bitmovinSourceItem
|
|
216
216
|
val playerModule = context.getNativeModule(PlayerModule::class.java)
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -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>
|