Skip to content

Commit

Permalink
Added missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
francodriansetti committed Mar 1, 2024
1 parent 109cbb9 commit 9710cc6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// InitializeSdkExample.swift
//
//
// Created by Franco Driansetti on 27/02/2024.
//

import PlaybackSDK

PlaybackSDKManager.shared.initialize(apiKey: "YOUR_API_KEY") { result in
switch result {
case .success:
print("Playback SDK initialized successfully.")
case .failure(let error):
print("Error initializing Playback SDK: \(error)")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// LoadPlayerViewTutorial.swift
//
//
// Created by Franco Driansetti on 27/02/2024.
//

import Foundation

PlayBackSDKManager.shared.loadPlayer(entryID: settingsManager.entryId, authorizationToken: settingsManager.authorizationToken, onError: { error in
// Handle the error here
switch error {
case .apiError(let statusCode, _):
print("\(statusCode)")
default:
print("Error loading HLS stream in PlaybackUIView: \(error.localizedDescription)")
}
})

0 comments on commit 9710cc6

Please sign in to comment.