Skip to content

Commit 60d2d5f

Browse files
committed
Pull out iOS drm config props regardless of legacy config
1 parent 969acdd commit 60d2d5f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ios/RNJWPlayer/RNJWPlayerView.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,13 @@ class RNJWPlayerView: UIView, JWPlayerDelegate, JWPlayerStateDelegate,
318318
self.deinitAudioSession()
319319
}
320320

321+
// Pull out top level iOS DRM values from config if present
322+
// This is most often used in non-legacy configs using JWP DRM solutions
323+
processSpcUrl = config["processSpcUrl"] as? String
324+
fairplayCertUrl = config["certificateUrl"] as? String
325+
contentUUID = config["contentUUID"] as? String
326+
321327
if forceLegacyConfig == true {
322-
// Pull from top level of config
323-
processSpcUrl = config["processSpcUrl"] as? String
324-
fairplayCertUrl = config["certificateUrl"] as? String
325-
contentUUID = config["contentUUID"] as? String
326328

327329
// Dangerous: check playlist for processSpcUrl / fairplayCertUrl in playlist
328330
// Only checks first playlist item as multi-item DRM playlists are ill advised
@@ -338,7 +340,6 @@ class RNJWPlayerView: UIView, JWPlayerDelegate, JWPlayerStateDelegate,
338340
}
339341
}
340342
} else {
341-
// TODO -- Ensure JWJSONParser pulls out cert/spc for sources (Expected in JW iOS SDK v4.19.0)
342343
}
343344

344345
do {

0 commit comments

Comments
 (0)