-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
109cbb9
commit 9710cc6
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Sources/PlaybackSDK/Documentation.docc/Resources/InitializeSdkExample.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)") | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
Sources/PlaybackSDK/Documentation.docc/Resources/LoadPlayerViewTutorial.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)") | ||
} | ||
}) |