// 3️⃣ Build download URL (includes token as query param) let url = URL(string: "https://cdn.extramovies.foundation/content/\(titleID)?token=\(license.licenseToken)")!
// 4️⃣ Create a resumable download task let task = URLSession.shared.downloadTask(with: url) localURL, response, error in // Handle completion: move file, encrypt, store metadata task.resume() activeTasks[UUID()] = task
func resume(downloadID: UUID) activeTasks[downloadID]?.resume()
func pause(downloadID: UUID) activeTasks[downloadID]?.suspend()
// 2️⃣ Request DRM license token let license = try await API.requestLicense(titleID: titleID, deviceID: deviceID)