vdocipher-rn-bridge 1.17.3 → 1.17.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.
- package/VdoPlayerView.tsx +0 -23
- package/android/build.gradle +3 -3
- package/ios/CreateMap.swift +113 -0
- package/ios/TrackSelection.swift +35 -1
- package/ios/VdoCipherRNView.swift +103 -57
- package/ios/VdoDownload.swift +16 -112
- package/ios/VdocipherRnBridgeViewManager.m +7 -0
- package/ios/VdocipherRnBridgeViewManager.swift +1 -1
- package/package.json +1 -1
- package/react-native-vdocipher-rn-bridge.podspec +1 -1
package/VdoPlayerView.tsx
CHANGED
|
@@ -179,11 +179,6 @@ class VdoPlayerView extends Component<MyProps, MyState> {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
isAdaptive = async() => {
|
|
182
|
-
if (Platform.OS == "ios" ) {
|
|
183
|
-
return new Promise(function(resolve, reject) {
|
|
184
|
-
reject("Method not supported for iOS");
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
182
|
return new Promise(async(resolve) => { await TrackSelection.isAdaptive((isAdaptive: boolean) => {
|
|
188
183
|
resolve(isAdaptive);
|
|
189
184
|
});
|
|
@@ -191,11 +186,6 @@ class VdoPlayerView extends Component<MyProps, MyState> {
|
|
|
191
186
|
}
|
|
192
187
|
|
|
193
188
|
getVideoQualities = async() => {
|
|
194
|
-
if (Platform.OS == "ios" ) {
|
|
195
|
-
return new Promise(function(resolve, reject) {
|
|
196
|
-
reject("Method not supported for iOS");
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
189
|
return new Promise(async(resolve) => { await TrackSelection.getVideoQualities((videoQualities: Array<VdoType.VideoQuality>) => {
|
|
200
190
|
resolve(videoQualities);
|
|
201
191
|
});
|
|
@@ -203,11 +193,6 @@ class VdoPlayerView extends Component<MyProps, MyState> {
|
|
|
203
193
|
}
|
|
204
194
|
|
|
205
195
|
getSelectedVideoQuality = async() => {
|
|
206
|
-
if (Platform.OS == "ios" ) {
|
|
207
|
-
return new Promise(function(resolve, reject) {
|
|
208
|
-
reject("Method not supported for iOS");
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
196
|
return new Promise(async(resolve) => { await TrackSelection.getSelectedVideoQuality((selectedVideoQuality: VdoType.VideoQuality) => {
|
|
212
197
|
resolve(selectedVideoQuality);
|
|
213
198
|
});
|
|
@@ -215,20 +200,12 @@ class VdoPlayerView extends Component<MyProps, MyState> {
|
|
|
215
200
|
}
|
|
216
201
|
|
|
217
202
|
setVideoQuality = (videoQuality: VdoType.VideoQuality) => {
|
|
218
|
-
if (Platform.OS == "ios" ) {
|
|
219
|
-
console.warn("Method not supported for iOS");
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
203
|
if (this._vdoPlayerView) {
|
|
223
204
|
this._vdoPlayerView.setVideoQuality(videoQuality);
|
|
224
205
|
}
|
|
225
206
|
}
|
|
226
207
|
|
|
227
208
|
enableAdaptiveVideo = () => {
|
|
228
|
-
if (Platform.OS == "ios" ) {
|
|
229
|
-
console.warn("Method not supported for iOS");
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
209
|
if (this._vdoPlayerView) {
|
|
233
210
|
this._vdoPlayerView.enableAdaptiveVideo();
|
|
234
211
|
}
|
package/android/build.gradle
CHANGED
|
@@ -18,8 +18,8 @@ apply plugin: 'com.android.library'
|
|
|
18
18
|
// TODO read from package.json
|
|
19
19
|
// "releaseVersionName" must be the same as "version" in package.json
|
|
20
20
|
// "releaseVersionCode" must increment by 1 with every release
|
|
21
|
-
def releaseVersionName = "1.17.
|
|
22
|
-
def releaseVersionCode =
|
|
21
|
+
def releaseVersionName = "1.17.5"
|
|
22
|
+
def releaseVersionCode = 26
|
|
23
23
|
|
|
24
24
|
android {
|
|
25
25
|
compileSdkVersion 33
|
|
@@ -86,5 +86,5 @@ repositories {
|
|
|
86
86
|
dependencies {
|
|
87
87
|
compileOnly 'com.facebook.react:react-native:+'
|
|
88
88
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
|
89
|
-
implementation 'com.vdocipher.aegis:vdocipher-android:1.23.
|
|
89
|
+
implementation 'com.vdocipher.aegis:vdocipher-android:1.23.3'
|
|
90
90
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
//
|
|
2
|
+
// CreateMap.swift
|
|
3
|
+
// react-native-vdocipher-rn-bridge
|
|
4
|
+
//
|
|
5
|
+
// Created by Manish Gupta on 31/08/23.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import UIKit
|
|
9
|
+
|
|
10
|
+
class CreateMap {
|
|
11
|
+
|
|
12
|
+
static var sharedInstance: CreateMap = CreateMap()
|
|
13
|
+
|
|
14
|
+
private init() {}
|
|
15
|
+
|
|
16
|
+
// MARK: Map creation functions
|
|
17
|
+
func createTracksMap(with videoQualities: [VdoFramework.VdoAsset.VideoQuality], forDownload: Bool = false) -> [[String: Any]] {
|
|
18
|
+
var tracks: [[String: Any]] = []
|
|
19
|
+
var counter = 1
|
|
20
|
+
for quality in videoQualities {
|
|
21
|
+
var track: [String: Any] = [:]
|
|
22
|
+
track["id"] = counter
|
|
23
|
+
if forDownload == true {
|
|
24
|
+
track["type"] = "video"
|
|
25
|
+
}
|
|
26
|
+
track["bitrate"] = quality.bitrate
|
|
27
|
+
let resolution = quality.resolution.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
28
|
+
let size = resolution.components(separatedBy: "x")
|
|
29
|
+
if size.count == 2 {
|
|
30
|
+
track["width"] = Int(size.first ?? "") ?? 0
|
|
31
|
+
track["height"] = Int(size.last ?? "") ?? 0
|
|
32
|
+
}
|
|
33
|
+
counter += 1
|
|
34
|
+
tracks.append(track)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return tracks
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
func createDownloadOptionsMap(with availableTracks: [[String: Any]], mediaInfo: [String: Any]) -> [String: Any] {
|
|
41
|
+
var downloadOptionsMap: [String: Any] = [:]
|
|
42
|
+
downloadOptionsMap["mediaId"] = mediaInfo["mediaId"]
|
|
43
|
+
downloadOptionsMap["mediaInfo"] = mediaInfo
|
|
44
|
+
downloadOptionsMap["availableTracks"] = availableTracks
|
|
45
|
+
return downloadOptionsMap
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
func createMediaInfoMap(with mediaInfo: MediaInfo) -> [String: Any] {
|
|
49
|
+
var mediaInfoMap : [String: Any] = [:]
|
|
50
|
+
|
|
51
|
+
mediaInfoMap["title"] = mediaInfo.title
|
|
52
|
+
mediaInfoMap["duration"] = Int(mediaInfo.duration) * 1000
|
|
53
|
+
mediaInfoMap["mediaId"] = mediaInfo.videoId
|
|
54
|
+
mediaInfoMap["description"] = mediaInfo.mediaDescription
|
|
55
|
+
mediaInfoMap["type"] = "info"
|
|
56
|
+
|
|
57
|
+
return mediaInfoMap
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
func createMediaInfoMap(with asset: VdoAsset) -> [String: Any] {
|
|
61
|
+
var mediaInfoMap : [String: Any] = [:]
|
|
62
|
+
|
|
63
|
+
mediaInfoMap["title"] = asset.title
|
|
64
|
+
mediaInfoMap["duration"] = Int(asset.duration ?? 0) * 1000
|
|
65
|
+
mediaInfoMap["mediaId"] = asset.videoId
|
|
66
|
+
mediaInfoMap["description"] = asset.description
|
|
67
|
+
mediaInfoMap["type"] = "info"
|
|
68
|
+
|
|
69
|
+
return mediaInfoMap
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func createVdoAssetMap(with asset: VdoAsset) -> [String: Any] {
|
|
73
|
+
var downloadStatus: [String: Any] = [:]
|
|
74
|
+
|
|
75
|
+
downloadStatus["mediaInfo"] = createMediaInfoMap(with: asset)
|
|
76
|
+
downloadStatus["downloadPercent"] = Int(asset.percentDownload * 100)
|
|
77
|
+
downloadStatus["status"] = CreateMap.sharedInstance.mapDownloadStateToRNText(downloadState: asset.downloadState)
|
|
78
|
+
downloadStatus["aspectRatio"] = asset.aspectRatio
|
|
79
|
+
if (asset.posters?.isEmpty == false) {
|
|
80
|
+
downloadStatus["poster"] = asset.posters?[0].url ?? ""
|
|
81
|
+
}
|
|
82
|
+
else{
|
|
83
|
+
downloadStatus["poster"] = ""
|
|
84
|
+
}
|
|
85
|
+
return downloadStatus
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
func createOfflineVdoAssetMap(with downloadInfo: DownloadInfo) -> [String: Any] {
|
|
89
|
+
var downloadStatus: [String: Any] = [:]
|
|
90
|
+
|
|
91
|
+
downloadStatus["mediaInfo"] = createMediaInfoMap(with: downloadInfo.mediaInfo)
|
|
92
|
+
downloadStatus["downloadPercent"] = Int(downloadInfo.percentDownloaded * 100)
|
|
93
|
+
downloadStatus["status"] = CreateMap.sharedInstance.mapDownloadStateToRNText(downloadState: downloadInfo.status)
|
|
94
|
+
downloadStatus["aspectRatio"] = downloadInfo.aspectRatio
|
|
95
|
+
downloadStatus["poster"] = downloadInfo.poster
|
|
96
|
+
return downloadStatus
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
func mapDownloadStateToRNText(downloadState: VdoAsset.DownloadState) -> String {
|
|
100
|
+
switch downloadState {
|
|
101
|
+
case .downloaded:
|
|
102
|
+
return "completed"
|
|
103
|
+
case.downloading:
|
|
104
|
+
return "downloading"
|
|
105
|
+
case .notDownloaded:
|
|
106
|
+
return "pending"
|
|
107
|
+
case .paused:
|
|
108
|
+
return "paused"
|
|
109
|
+
@unknown default:
|
|
110
|
+
return "pending"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
package/ios/TrackSelection.swift
CHANGED
|
@@ -31,9 +31,13 @@ class TrackSelection: NSObject {
|
|
|
31
31
|
counter += 1
|
|
32
32
|
}
|
|
33
33
|
TrackSelection.captionLanguagesMap = captionLanguages
|
|
34
|
+
if let qualities = asset?.getVideoQualities() {
|
|
35
|
+
TrackSelection.videoQualitiesMap = CreateMap.sharedInstance.createTracksMap(with: qualities)
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
static var captionLanguagesMap: [[String: Any]]?
|
|
40
|
+
static var videoQualitiesMap: [[String: Any]]?
|
|
37
41
|
|
|
38
42
|
@objc func getCaptionLanguages(_ callback: RCTResponseSenderBlock) {
|
|
39
43
|
guard let captionLanguagesMap = TrackSelection.captionLanguagesMap else {
|
|
@@ -55,6 +59,36 @@ class TrackSelection: NSObject {
|
|
|
55
59
|
|
|
56
60
|
@objc func getDuration(_ callback: RCTResponseSenderBlock) {
|
|
57
61
|
guard let duration = TrackSelection.asset?.duration else {return}
|
|
58
|
-
callback([["duration": duration]])
|
|
62
|
+
callback([["duration": duration * 1000.0]])
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@objc func getVideoQualities(_ callback: RCTResponseSenderBlock) {
|
|
66
|
+
guard let videoQualitiesMap = TrackSelection.videoQualitiesMap else {
|
|
67
|
+
callback(nil)
|
|
68
|
+
return
|
|
69
|
+
}
|
|
70
|
+
callback([videoQualitiesMap])
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@objc func getSelectedVideoQuality(_ callback: RCTResponseSenderBlock) {
|
|
74
|
+
guard let videoQualities = TrackSelection.asset?.getVideoQualities(),
|
|
75
|
+
let index = videoQualities.firstIndex(where: {$0.active == true}),
|
|
76
|
+
let videoQualitiesMap = TrackSelection.videoQualitiesMap,
|
|
77
|
+
videoQualitiesMap.count > index else {
|
|
78
|
+
callback([])
|
|
79
|
+
return
|
|
80
|
+
}
|
|
81
|
+
callback([videoQualitiesMap[index]])
|
|
59
82
|
}
|
|
83
|
+
|
|
84
|
+
@objc func isAdaptive(_ callback: RCTResponseSenderBlock) {
|
|
85
|
+
guard let videoQualities = TrackSelection.asset?.getVideoQualities(),
|
|
86
|
+
let index = videoQualities.firstIndex(where: {$0.active == true}),
|
|
87
|
+
let videoQualitiesMap = TrackSelection.videoQualitiesMap,
|
|
88
|
+
videoQualitiesMap.count > index else {
|
|
89
|
+
callback([true])
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
callback([false])
|
|
93
|
+
}
|
|
60
94
|
}
|
|
@@ -25,6 +25,7 @@ class VdoCipherRNView: UIView {
|
|
|
25
25
|
private var playerItemBufferKeepUpObserver: NSKeyValueObservation?
|
|
26
26
|
private var playerItemBufferFullObserver: NSKeyValueObservation?
|
|
27
27
|
|
|
28
|
+
// MARK: 'VdoCipherRNView' lifecycle functions
|
|
28
29
|
private var playerState: PlayerState = .unknown {
|
|
29
30
|
didSet{
|
|
30
31
|
if oldValue != playerState {
|
|
@@ -99,26 +100,42 @@ class VdoCipherRNView: UIView {
|
|
|
99
100
|
})
|
|
100
101
|
}
|
|
101
102
|
|
|
103
|
+
@objc func videoDidEnd(notification: NSNotification) {
|
|
104
|
+
if self.playerState == .ended {
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
self.sendPlayerProgress()
|
|
108
|
+
self.playerState = .ended
|
|
109
|
+
self.playWhenReady = false
|
|
110
|
+
EventEmitter.sharedInstance.dispatch(name: .EVENT_MEDIA_ENDED, params: nil)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
func setUpPlayer(_ player: AVPlayer) {
|
|
114
|
+
if isLoaded == true {
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
isLoaded = true
|
|
118
|
+
self.player = player
|
|
119
|
+
self.removeObservers()
|
|
120
|
+
self.addObserversToPlayer()
|
|
121
|
+
|
|
122
|
+
guard let asset = asset else { return }
|
|
123
|
+
let mInfo = Media(mediaId: asset.videoId,
|
|
124
|
+
type: playbackType.rawValue,
|
|
125
|
+
title: asset.title ?? "",
|
|
126
|
+
description: asset.description,
|
|
127
|
+
duration: (Int(asset.duration ?? 0.0) * 1000) )
|
|
128
|
+
guard let eventInfo = getJSONEncodedEventDictionary(info: mInfo) else { return }
|
|
129
|
+
EventEmitter.sharedInstance.dispatch(name: EventName.EVENT_LOADED,
|
|
130
|
+
params: [Keys.EVENT_PROP_MEDIA_INFO.rawValue : eventInfo])
|
|
131
|
+
}
|
|
132
|
+
|
|
102
133
|
private func sendPlayerProgress() {
|
|
103
134
|
let currentTime = Int(self.player?.currentItem?.currentTime().seconds.rounded( .down) ?? 0.0 ) * 1000
|
|
104
135
|
if currentTime > 0 {
|
|
105
136
|
EventEmitter.sharedInstance.dispatch(name: .EVENT_PROGRESS, params: [Keys.EVENT_PROP_CURRENT_TIME.rawValue : currentTime])
|
|
106
137
|
}
|
|
107
138
|
}
|
|
108
|
-
|
|
109
|
-
func setCaptionLanguage(lanCode: String?) -> Bool {
|
|
110
|
-
var isSuccess: Bool = false
|
|
111
|
-
guard let asset = self.asset else { return isSuccess } // return false
|
|
112
|
-
if lanCode == nil {
|
|
113
|
-
isSuccess = asset.setCaption(nil)
|
|
114
|
-
return isSuccess
|
|
115
|
-
} else {
|
|
116
|
-
if let caption = asset.captions?.first(where: { $0.lang == lanCode }) {
|
|
117
|
-
isSuccess = asset.setCaption(caption)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
return isSuccess
|
|
121
|
-
}
|
|
122
139
|
|
|
123
140
|
func removeObservers()
|
|
124
141
|
{
|
|
@@ -198,17 +215,7 @@ class VdoCipherRNView: UIView {
|
|
|
198
215
|
})
|
|
199
216
|
}
|
|
200
217
|
|
|
201
|
-
|
|
202
|
-
@objc func videoDidEnd(notification: NSNotification) {
|
|
203
|
-
if self.playerState == .ended {
|
|
204
|
-
return
|
|
205
|
-
}
|
|
206
|
-
self.sendPlayerProgress()
|
|
207
|
-
self.playerState = .ended
|
|
208
|
-
self.playWhenReady = false
|
|
209
|
-
EventEmitter.sharedInstance.dispatch(name: .EVENT_MEDIA_ENDED, params: nil)
|
|
210
|
-
}
|
|
211
|
-
|
|
218
|
+
// MARK: APIs
|
|
212
219
|
@objc func playerReadyToPlay() {
|
|
213
220
|
self.playerState = .ready
|
|
214
221
|
if self.preferredCaptionsLanguage?.isEmpty == false {
|
|
@@ -262,21 +269,53 @@ class VdoCipherRNView: UIView {
|
|
|
262
269
|
let selectedCaptionName = caption["name"] as? String,
|
|
263
270
|
let selectedCaptionObject = captions.first(where: {$0.captionName ?? "" == selectedCaptionName}) else {return}
|
|
264
271
|
if (asset.setCaption(selectedCaptionObject) == true) {
|
|
265
|
-
|
|
266
|
-
let name = selectedCaption.captionName,
|
|
267
|
-
let selectedCaptionMap = TrackSelection.captionLanguagesMap?.first(where: {$0["name"] as? String == name}) else {
|
|
268
|
-
return
|
|
269
|
-
}
|
|
270
|
-
EventEmitter.sharedInstance.dispatch(name: .EVENT_TRACKS_CHANGED, params: [Keys.EVENT_PROP_AVAILABLE_TRACKS.rawValue : TrackSelection.captionLanguagesMap ?? [], Keys.EVENT_PROP_SELECTED_TRACKS.rawValue: [selectedCaptionMap]])
|
|
272
|
+
self.sendTrackChangeEvent()
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
@objc func setDisableCaptions(_ val: Int) {
|
|
275
277
|
if (TrackSelection.asset?.setCaption(nil) == true) {
|
|
276
|
-
|
|
278
|
+
self.sendTrackChangeEvent()
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
|
|
282
|
+
@objc func setVideoQuality(_ videoQuality: [String: Any]) {
|
|
283
|
+
guard let asset = self.asset,
|
|
284
|
+
let index = videoQuality["id"] as? Int,
|
|
285
|
+
asset.getVideoQualities().count >= index else {return}
|
|
286
|
+
|
|
287
|
+
let selectedQuality = asset.getVideoQualities()[index-1]
|
|
288
|
+
asset.enableManualAdaptation(selectedQuality)
|
|
289
|
+
self.sendTrackChangeEvent()
|
|
290
|
+
self.removeObservers()
|
|
291
|
+
self.addObserversToPlayer()
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@objc func setAdaptiveVideo(_ val: Bool) {
|
|
295
|
+
guard let asset = self.asset,
|
|
296
|
+
val == true else {return}
|
|
297
|
+
|
|
298
|
+
asset.enableAutoAdaptation()
|
|
299
|
+
self.sendTrackChangeEvent()
|
|
300
|
+
self.removeObservers()
|
|
301
|
+
self.addObserversToPlayer()
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
func setCaptionLanguage(lanCode: String?) -> Bool {
|
|
305
|
+
var isSuccess: Bool = false
|
|
306
|
+
guard let asset = self.asset else { return isSuccess } // return false
|
|
307
|
+
if lanCode == nil {
|
|
308
|
+
isSuccess = asset.setCaption(nil)
|
|
309
|
+
return isSuccess
|
|
310
|
+
} else {
|
|
311
|
+
if let caption = asset.captions?.first(where: { $0.lang == lanCode }) {
|
|
312
|
+
isSuccess = asset.setCaption(caption)
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return isSuccess
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// MARK: EVENT TRACKING FUNCTIONS
|
|
280
319
|
func sendErrorEventWithDescription(_ errorDescription: ErrorDescription) {
|
|
281
320
|
if let errorInfo = getJSONEncodedEventDictionary(info: errorDescription) {
|
|
282
321
|
EventEmitter.sharedInstance.dispatch(name: .EVENT_LOAD_ERROR, params: [Keys.EVENT_PROP_ERROR_DESCRIPTION.rawValue : errorInfo])
|
|
@@ -293,9 +332,38 @@ class VdoCipherRNView: UIView {
|
|
|
293
332
|
}
|
|
294
333
|
return info
|
|
295
334
|
}
|
|
335
|
+
|
|
336
|
+
func sendTrackChangeEvent() {
|
|
337
|
+
|
|
338
|
+
guard let asset = TrackSelection.asset,
|
|
339
|
+
asset == self.asset,
|
|
340
|
+
let captionLanguagesMap = TrackSelection.captionLanguagesMap,
|
|
341
|
+
let videoQualitiesMap = TrackSelection.videoQualitiesMap else {return}
|
|
342
|
+
|
|
343
|
+
var availableTrackMaps = [[String: Any]] ()
|
|
344
|
+
availableTrackMaps.append(contentsOf: captionLanguagesMap)
|
|
345
|
+
availableTrackMaps.append(contentsOf: videoQualitiesMap)
|
|
346
|
+
|
|
347
|
+
var selectedTracks = [[String: Any]] ()
|
|
348
|
+
|
|
349
|
+
let videoQualities = asset.getVideoQualities()
|
|
350
|
+
if let index = videoQualities.firstIndex(where: {$0.active == true}),
|
|
351
|
+
videoQualitiesMap.count > index {
|
|
352
|
+
selectedTracks.append(videoQualitiesMap[index])
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if let selectedCaption = asset.getCurrentEnabledCaption(),
|
|
356
|
+
let name = selectedCaption.captionName,
|
|
357
|
+
let selectedCaptionMap = TrackSelection.captionLanguagesMap?.first(where: {$0["name"] as? String == name}) {
|
|
358
|
+
selectedTracks.append(selectedCaptionMap)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
EventEmitter.sharedInstance.dispatch(name: .EVENT_TRACKS_CHANGED, params: [Keys.EVENT_PROP_AVAILABLE_TRACKS.rawValue: availableTrackMaps, Keys.EVENT_PROP_SELECTED_TRACKS.rawValue: selectedTracks])
|
|
362
|
+
}
|
|
296
363
|
}
|
|
297
364
|
|
|
298
365
|
extension VdoCipherRNView: AssetPlaybackDelegate {
|
|
366
|
+
// MARK: 'AssetPlaybackDelegate' FUNCTIONS
|
|
299
367
|
func streamLoadError(error: VdoError) {
|
|
300
368
|
let errorDescription = ErrorDescription(errorCode: error.code, errorMsg: error.message, httpStatusCode: -1)
|
|
301
369
|
self.sendErrorEventWithDescription(errorDescription)
|
|
@@ -308,29 +376,10 @@ extension VdoCipherRNView: AssetPlaybackDelegate {
|
|
|
308
376
|
func streamPlaybackManager(playerCurrentItemDidChange player: AVPlayer) {
|
|
309
377
|
self.setUpPlayer(player)
|
|
310
378
|
}
|
|
311
|
-
|
|
312
|
-
func setUpPlayer(_ player: AVPlayer) {
|
|
313
|
-
if isLoaded == true {
|
|
314
|
-
return
|
|
315
|
-
}
|
|
316
|
-
isLoaded = true
|
|
317
|
-
self.player = player
|
|
318
|
-
self.removeObservers()
|
|
319
|
-
self.addObserversToPlayer()
|
|
320
|
-
|
|
321
|
-
guard let asset = asset else { return }
|
|
322
|
-
let mInfo = Media(mediaId: asset.videoId,
|
|
323
|
-
type: playbackType.rawValue,
|
|
324
|
-
title: asset.title ?? "",
|
|
325
|
-
description: asset.description,
|
|
326
|
-
duration: (Int(asset.duration ?? 0.0) * 1000) )
|
|
327
|
-
guard let eventInfo = getJSONEncodedEventDictionary(info: mInfo) else { return }
|
|
328
|
-
EventEmitter.sharedInstance.dispatch(name: EventName.EVENT_LOADED,
|
|
329
|
-
params: [Keys.EVENT_PROP_MEDIA_INFO.rawValue : eventInfo])
|
|
330
|
-
}
|
|
331
379
|
}
|
|
332
380
|
|
|
333
381
|
extension VdoCipherRNView: VdoPlayerViewControllerDelegate {
|
|
382
|
+
// MARK: 'VdoPlayerViewControllerDelegate' FUNCTIONS
|
|
334
383
|
func didTapEnterFullScreen(for id: String) {
|
|
335
384
|
EventEmitter.sharedInstance.dispatch(name: .EVENT_ENTER_FULLSCREEN, params: nil)
|
|
336
385
|
}
|
|
@@ -345,15 +394,12 @@ extension VdoCipherRNView: VdoPlayerViewControllerDelegate {
|
|
|
345
394
|
}
|
|
346
395
|
|
|
347
396
|
func didChangeCaption(for id: String, to name: String, code: String) {
|
|
348
|
-
|
|
349
|
-
return
|
|
350
|
-
}
|
|
351
|
-
EventEmitter.sharedInstance.dispatch(name: .EVENT_TRACKS_CHANGED, params: [Keys.EVENT_PROP_AVAILABLE_TRACKS.rawValue : TrackSelection.captionLanguagesMap ?? [], Keys.EVENT_PROP_SELECTED_TRACKS.rawValue: [selectedCaptionMap]])
|
|
397
|
+
self.sendTrackChangeEvent()
|
|
352
398
|
}
|
|
353
399
|
}
|
|
354
400
|
|
|
355
401
|
extension VdoCipherRNView: UINavigationControllerDelegate {
|
|
356
|
-
|
|
402
|
+
// MARK: 'UINavigationControllerDelegate' FUNCTIONS
|
|
357
403
|
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
|
|
358
404
|
|
|
359
405
|
}
|
package/ios/VdoDownload.swift
CHANGED
|
@@ -130,7 +130,7 @@ class VdoDownload: RCTEventEmitter {
|
|
|
130
130
|
else{
|
|
131
131
|
downloadFilter = DownloadInfoFilter (videoId: mediaIds.count != 0 ? mediaIds : nil)
|
|
132
132
|
}
|
|
133
|
-
let downloadedAssests = VdoCipher.getListOfDownloads(filterBy: downloadFilter).map {
|
|
133
|
+
let downloadedAssests = VdoCipher.getListOfDownloads(filterBy: downloadFilter).map { CreateMap.sharedInstance.createOfflineVdoAssetMap(with: $0) }
|
|
134
134
|
successCallback([downloadedAssests])
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -187,12 +187,12 @@ class VdoDownload: RCTEventEmitter {
|
|
|
187
187
|
Error_Keys.EVENT_PROP_ERROR_MSG.rawValue: "Tracks Not Found"]])
|
|
188
188
|
return
|
|
189
189
|
}
|
|
190
|
-
let availableTracks =
|
|
190
|
+
let availableTracks = CreateMap.sharedInstance.createTracksMap(with: qualities, forDownload: true)
|
|
191
191
|
self.availableTracksMap = availableTracks
|
|
192
192
|
self.asset = asset
|
|
193
193
|
self.optionParams = optionParams
|
|
194
|
-
let mediaInfo =
|
|
195
|
-
let downloadOptions =
|
|
194
|
+
let mediaInfo = CreateMap.sharedInstance.createMediaInfoMap(with: asset)
|
|
195
|
+
let downloadOptions = CreateMap.sharedInstance.createDownloadOptionsMap(with: availableTracks, mediaInfo: mediaInfo)
|
|
196
196
|
let downloadOptionsMap = [playbackInfo, downloadOptions] as [Any]
|
|
197
197
|
successCallback(downloadOptionsMap)
|
|
198
198
|
})
|
|
@@ -220,9 +220,9 @@ class VdoDownload: RCTEventEmitter {
|
|
|
220
220
|
let index = selections.first,
|
|
221
221
|
asset.getVideoQualities().count > index {
|
|
222
222
|
// assuming index from 'availableTracksMap' is equivalent to index of 'asset.getVideoQualities()' as both are ordered pairs
|
|
223
|
-
asset.startDownload(otp: otp, playbackInfo: playbackInfo, videoQuality: asset.getVideoQualities()[index])
|
|
224
223
|
asset.percentDownload = 0
|
|
225
224
|
successCallback([])
|
|
225
|
+
asset.startDownload(otp: otp, playbackInfo: playbackInfo, videoQuality: asset.getVideoQualities()[index])
|
|
226
226
|
} else {
|
|
227
227
|
errorCallback([[Error_Keys.EVENT_PROP_ERROR_CODE.rawValue: "-1",
|
|
228
228
|
Error_Keys.EVENT_PROP_ERROR_MSG.rawValue: "Invalid selection"]])
|
|
@@ -266,7 +266,7 @@ class VdoDownload: RCTEventEmitter {
|
|
|
266
266
|
asset.deleteDownload()
|
|
267
267
|
}
|
|
268
268
|
asset.percentDownload = 0
|
|
269
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_DELETED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
269
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_DELETED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
}
|
|
@@ -299,22 +299,22 @@ class VdoDownload: RCTEventEmitter {
|
|
|
299
299
|
if let videoId = notice[VdoAsset.Keys.videoId] as? String {
|
|
300
300
|
if videoId == self.asset?.videoId, let asset = asset {
|
|
301
301
|
if newState == .downloaded {
|
|
302
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_COMPLETED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
302
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_COMPLETED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
303
303
|
} else if newState == .downloading {
|
|
304
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_QUEUED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
304
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_QUEUED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
305
305
|
} else {
|
|
306
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
306
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
307
307
|
}
|
|
308
308
|
} else {
|
|
309
309
|
let customPlayerId = VdoDownload.getCustomPlayerIdForMediaId(videoId)
|
|
310
310
|
VdoAsset.createAsset(videoId: videoId, playerId: customPlayerId) { asset, _ in
|
|
311
311
|
guard let asset = asset else { return }
|
|
312
312
|
if newState == .downloaded {
|
|
313
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_COMPLETED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
313
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_COMPLETED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
314
314
|
} else if newState == .downloading {
|
|
315
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_QUEUED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
315
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_QUEUED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
316
316
|
} else {
|
|
317
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
317
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
}
|
|
@@ -329,13 +329,13 @@ class VdoDownload: RCTEventEmitter {
|
|
|
329
329
|
if let videoId = notice[VdoAsset.Keys.videoId] as? String {
|
|
330
330
|
if videoId == self.asset?.videoId, let asset = asset {
|
|
331
331
|
asset.percentDownload = percentDownload
|
|
332
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
332
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
333
333
|
} else {
|
|
334
334
|
let customPlayerId = VdoDownload.getCustomPlayerIdForMediaId(videoId)
|
|
335
335
|
VdoAsset.createAsset(videoId: videoId, playerId: customPlayerId) { asset, _ in
|
|
336
336
|
guard let asset = asset else { return }
|
|
337
337
|
asset.percentDownload = percentDownload
|
|
338
|
-
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus":
|
|
338
|
+
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_CHANGED, params: ["mediaId": asset.videoId, "downloadStatus": CreateMap.sharedInstance.createVdoAssetMap(with: asset)])
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -346,7 +346,7 @@ class VdoDownload: RCTEventEmitter {
|
|
|
346
346
|
guard let message = notice[VdoAsset.Keys.message] as? String, let code = notice[VdoAsset.Keys.code] else {return}
|
|
347
347
|
if let videoId = notice[VdoAsset.Keys.videoId] as? String {
|
|
348
348
|
if videoId == self.asset?.videoId, let asset = asset {
|
|
349
|
-
var assetMap =
|
|
349
|
+
var assetMap = CreateMap.sharedInstance.createVdoAssetMap(with: asset)
|
|
350
350
|
assetMap["reasonDescription"] = message
|
|
351
351
|
assetMap["reason"] = code
|
|
352
352
|
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_FAILED, params: ["mediaId": asset.videoId, "downloadStatus": assetMap])
|
|
@@ -354,7 +354,7 @@ class VdoDownload: RCTEventEmitter {
|
|
|
354
354
|
let customPlayerId = VdoDownload.getCustomPlayerIdForMediaId(videoId)
|
|
355
355
|
VdoAsset.createAsset(videoId: videoId, playerId: customPlayerId) { asset, _ in
|
|
356
356
|
guard let asset = asset else { return }
|
|
357
|
-
var assetMap =
|
|
357
|
+
var assetMap = CreateMap.sharedInstance.createVdoAssetMap(with: asset)
|
|
358
358
|
assetMap["reasonDescription"] = message
|
|
359
359
|
assetMap["reason"] = code
|
|
360
360
|
DownloadEventEmitter.sharedInstance.dispatch(name: .EVENT_FAILED, params: ["mediaId": asset.videoId, "downloadStatus": assetMap])
|
|
@@ -363,102 +363,6 @@ class VdoDownload: RCTEventEmitter {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
// MARK: Map creation functions
|
|
367
|
-
private func createTracksMap(with videoQualities: [VdoFramework.VdoAsset.VideoQuality]) -> [[String: Any]] {
|
|
368
|
-
var tracks: [[String: Any]] = []
|
|
369
|
-
var counter = 1
|
|
370
|
-
for quality in videoQualities {
|
|
371
|
-
var track: [String: Any] = [:]
|
|
372
|
-
track["id"] = counter
|
|
373
|
-
track["type"] = "video"
|
|
374
|
-
track["bitrate"] = quality.bitrate
|
|
375
|
-
let resolution = quality.resolution.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
376
|
-
let size = resolution.components(separatedBy: "x")
|
|
377
|
-
if size.count == 2 {
|
|
378
|
-
track["width"] = Int(size.first ?? "") ?? 0
|
|
379
|
-
track["height"] = Int(size.last ?? "") ?? 0
|
|
380
|
-
}
|
|
381
|
-
counter += 1
|
|
382
|
-
tracks.append(track)
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
return tracks
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
private func createDownloadOptionsMap(with availableTracks: [[String: Any]], mediaInfo: [String: Any]) -> [String: Any] {
|
|
389
|
-
var downloadOptionsMap: [String: Any] = [:]
|
|
390
|
-
downloadOptionsMap["mediaId"] = mediaInfo["mediaId"]
|
|
391
|
-
downloadOptionsMap["mediaInfo"] = mediaInfo
|
|
392
|
-
downloadOptionsMap["availableTracks"] = availableTracks
|
|
393
|
-
return downloadOptionsMap
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
private func createMediaInfoMap(with mediaInfo: MediaInfo) -> [String: Any] {
|
|
397
|
-
var mediaInfoMap : [String: Any] = [:]
|
|
398
|
-
|
|
399
|
-
mediaInfoMap["title"] = mediaInfo.title
|
|
400
|
-
mediaInfoMap["duration"] = Int(mediaInfo.duration ) * 1000
|
|
401
|
-
mediaInfoMap["mediaId"] = mediaInfo.videoId
|
|
402
|
-
mediaInfoMap["description"] = mediaInfo.mediaDescription
|
|
403
|
-
mediaInfoMap["type"] = "info"
|
|
404
|
-
|
|
405
|
-
return mediaInfoMap
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
private func createMediaInfoMap(with asset: VdoAsset) -> [String: Any] {
|
|
409
|
-
var mediaInfoMap : [String: Any] = [:]
|
|
410
|
-
|
|
411
|
-
mediaInfoMap["title"] = asset.title
|
|
412
|
-
mediaInfoMap["duration"] = Int(asset.duration ?? 0) * 1000
|
|
413
|
-
mediaInfoMap["mediaId"] = asset.videoId
|
|
414
|
-
mediaInfoMap["description"] = asset.description
|
|
415
|
-
mediaInfoMap["type"] = "info"
|
|
416
|
-
|
|
417
|
-
return mediaInfoMap
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
private func createVdoAssetMap(with asset: VdoAsset) -> [String: Any] {
|
|
421
|
-
var downloadStatus: [String: Any] = [:]
|
|
422
|
-
|
|
423
|
-
downloadStatus["mediaInfo"] = createMediaInfoMap(with: asset)
|
|
424
|
-
downloadStatus["downloadPercent"] = Int(asset.percentDownload * 100)
|
|
425
|
-
downloadStatus["status"] = self.mapDownloadStateToRNText(downloadState: asset.downloadState)
|
|
426
|
-
downloadStatus["aspectRatio"] = asset.aspectRatio
|
|
427
|
-
if (asset.posters?.isEmpty == false) {
|
|
428
|
-
downloadStatus["poster"] = asset.posters?[0].url ?? ""
|
|
429
|
-
}
|
|
430
|
-
else{
|
|
431
|
-
downloadStatus["poster"] = ""
|
|
432
|
-
}
|
|
433
|
-
return downloadStatus
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
private func createOfflineVdoAssetMap(with downloadInfo: DownloadInfo) -> [String: Any] {
|
|
437
|
-
var downloadStatus: [String: Any] = [:]
|
|
438
|
-
|
|
439
|
-
downloadStatus["mediaInfo"] = createMediaInfoMap(with: downloadInfo.mediaInfo)
|
|
440
|
-
downloadStatus["downloadPercent"] = Int(downloadInfo.percentDownloaded * 100)
|
|
441
|
-
downloadStatus["status"] = self.mapDownloadStateToRNText(downloadState: downloadInfo.status)
|
|
442
|
-
downloadStatus["aspectRatio"] = downloadInfo.aspectRatio
|
|
443
|
-
downloadStatus["poster"] = downloadInfo.poster
|
|
444
|
-
return downloadStatus
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
private func mapDownloadStateToRNText(downloadState: VdoAsset.DownloadState) -> String {
|
|
448
|
-
switch downloadState {
|
|
449
|
-
case .downloaded:
|
|
450
|
-
return "completed"
|
|
451
|
-
case.downloading:
|
|
452
|
-
return "downloading"
|
|
453
|
-
case .notDownloaded:
|
|
454
|
-
return "pending"
|
|
455
|
-
case .paused:
|
|
456
|
-
return "paused"
|
|
457
|
-
@unknown default:
|
|
458
|
-
return "pending"
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
366
|
static func saveCustomPlayerIdForMediaId(_ mediaId: String, playerId: String?) {
|
|
463
367
|
let userDefaults: UserDefaults? = UserDefaults.init(suiteName: "com.vdocipher.ios.VdoFramework")
|
|
464
368
|
var downloadedMediaIdPlayerIdMap = userDefaults?.value(forKey: "downloadedMediaIdPlayerIdMap") as? [String: String] ?? [String: String] ()
|
|
@@ -27,6 +27,8 @@ RCT_EXPORT_VIEW_PROPERTY(playbackSpeed, float)
|
|
|
27
27
|
RCT_EXPORT_VIEW_PROPERTY(seek, int)
|
|
28
28
|
RCT_EXPORT_VIEW_PROPERTY(captionLanguage, NSDictionary *)
|
|
29
29
|
RCT_EXPORT_VIEW_PROPERTY(disableCaptions, int)
|
|
30
|
+
RCT_EXPORT_VIEW_PROPERTY(videoQuality, NSDictionary *)
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(adaptiveVideo, BOOL)
|
|
30
32
|
|
|
31
33
|
- (VdoCipherRNView *)view
|
|
32
34
|
{
|
|
@@ -48,6 +50,8 @@ RCT_EXPORT_VIEW_PROPERTY(playbackSpeed, float)
|
|
|
48
50
|
RCT_EXPORT_VIEW_PROPERTY(seek, int)
|
|
49
51
|
RCT_EXPORT_VIEW_PROPERTY(captionLanguage, NSDictionary *)
|
|
50
52
|
RCT_EXPORT_VIEW_PROPERTY(disableCaptions, int)
|
|
53
|
+
RCT_EXPORT_VIEW_PROPERTY(videoQuality, NSDictionary *)
|
|
54
|
+
RCT_EXPORT_VIEW_PROPERTY(adaptiveVideo, BOOL)
|
|
51
55
|
|
|
52
56
|
|
|
53
57
|
- (VdoCipherRNView *)view
|
|
@@ -95,6 +99,9 @@ RCT_EXPORT_METHOD(getPlaybackPropertiesV2: (RCTResponseSenderBlock) callback)
|
|
|
95
99
|
RCT_EXTERN_METHOD(getCaptionLanguages: (RCTResponseSenderBlock) callback)
|
|
96
100
|
RCT_EXTERN_METHOD(getSelectedCaptionLanguage: (RCTResponseSenderBlock) callback)
|
|
97
101
|
RCT_EXTERN_METHOD(getDuration: (RCTResponseSenderBlock) callback)
|
|
102
|
+
RCT_EXTERN_METHOD(getVideoQualities: (RCTResponseSenderBlock) callback)
|
|
103
|
+
RCT_EXTERN_METHOD(getSelectedVideoQuality: (RCTResponseSenderBlock) callback)
|
|
104
|
+
RCT_EXTERN_METHOD(isAdaptive: (RCTResponseSenderBlock) callback)
|
|
98
105
|
|
|
99
106
|
+ (BOOL)requiresMainQueueSetup
|
|
100
107
|
{
|
|
@@ -5,7 +5,7 @@ import VdoFramework
|
|
|
5
5
|
@objc(VdocipherRnBridge)
|
|
6
6
|
class VdocipherRnBridge: RCTViewManager {
|
|
7
7
|
|
|
8
|
-
static let vdocipherRnBridgeVersionString = "1.17.
|
|
8
|
+
static let vdocipherRnBridgeVersionString = "1.17.5"
|
|
9
9
|
|
|
10
10
|
@objc override static func requiresMainQueueSetup() -> Bool {
|
|
11
11
|
return true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vdocipher-rn-bridge",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.5",
|
|
4
4
|
"description": "React native bridge library that delegates to vdocipher native android SDK",
|
|
5
5
|
"homepage": "https://www.vdocipher.com/docs/mobile/react-native/getting-started/",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "VdoFramework", "2.5.
|
|
20
|
+
s.dependency "VdoFramework", "2.5.3"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
23
23
|
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|