Skip to content

Commit

Permalink
one more todo
Browse files Browse the repository at this point in the history
  • Loading branch information
daytime-em committed Apr 25, 2024
1 parent 51019cd commit f360a74
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/MuxPlayerSwift/Fairplay/FairplaySessionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FairplaySessionManager {
var request = URLRequest(url: licenseURL(playbackId: playbackID, drmToken: drmToken, licenseDomain: licenseDomain))

// NOTE: The format of this POST body is likely to change before release. Instead of accepting
// this form-encoded body, a subsequent change will required only the HTTP body
// this form-encoded body, a subsequent change will require only the HTTP body
// BODY PARAMS
// Base-64 the SPC, urlencode that, prepare form-encoded body with spc
let encodedSpcMessage = urlEncodeBase64(spcData.base64EncodedString())
Expand All @@ -84,8 +84,6 @@ class FairplaySessionManager {
request.httpMethod = "POST"
request.httpBody = postData.data(using: .utf8, allowLossyConversion: true)

// TODO: application/x-www-form-urlencoded

let task = urlSession.dataTask(with: request) { [completion] data, response, error in
if let httpResponse = response as? HTTPURLResponse {
let responseCode = httpResponse.statusCode

Check warning on line 89 in Sources/MuxPlayerSwift/Fairplay/FairplaySessionManager.swift

View workflow job for this annotation

GitHub Actions / Run Unit Tests

initialization of immutable value 'responseCode' was never used; consider replacing with assignment to '_' or removing it
Expand All @@ -103,6 +101,7 @@ class FairplaySessionManager {
}

if let ckcData = data {
// TODO: This assumes the response body is base64
let ckcMessage = Data(base64Encoded: ckcData)

Check warning on line 105 in Sources/MuxPlayerSwift/Fairplay/FairplaySessionManager.swift

View workflow job for this annotation

GitHub Actions / Run Unit Tests

initialization of immutable value 'ckcMessage' was never used; consider replacing with assignment to '_' or removing it

// Also log the CKC
Expand Down

0 comments on commit f360a74

Please sign in to comment.