diff --git a/Package.swift b/Package.swift index ff20d1d..74145a4 100644 --- a/Package.swift +++ b/Package.swift @@ -37,7 +37,9 @@ let package = Package( name: "PlaybackSDK", dependencies: [ .product(name: "BitmovinPlayer", package: "BitmovinPlayer"), - ] + ], + resources: [ + .process("PrivacyInfo.xcprivacy")] ), .testTarget( name: "PlaybackSDKTests", diff --git a/README.md b/README.md index 49c35df..5186c5d 100644 --- a/README.md +++ b/README.md @@ -84,23 +84,33 @@ PlayBackSDKManager.shared.loadPlayer(entryID: entryId, authorizationToken: autho ``` # Playing Access-Controlled Content -To play premium or freemium on-demand and live videos, an `authorizationToken` has to be passed into the player. -Before loading the player, a call to CloudPay to start session must be made with the same token. +To play on-demand and live videos that require authorization, at some point before loading the player your app must call CloudPay to start session, passing the authorization token: ```swift "\(baseURL)/sso/start?token=\(authorizationToken)" ``` -In case a custom `user-agent` header is set for the request when creating a token, it should be passed to the player as well. +Then the same token should be passed into the `loadPlayer(entryID:, authorizationToken:)` method of `PlayBackSDkManager`. +For the free videos that user should be able to watch without logging in, starting the session is not required and `authorizationToken` can be set to an empty string. + +> [!NOTE] +> If the user is authenticated, has enough access level to watch a video, the session was started and the same token was passed to the player but the videos still throw a 401 error, it might be related to these requests having different user-agent headers. + +## Configure user-agent +Sometimes a custom `user-agent` header is automatically set for the requests on iOS when creating a token and starting a session. `Alamofire` and other 3rd party networking frameworks can modify this header to include information about themselves. In such cases they should either be configured to not modify the header, or the custom header should be passed to the player as well. Example: ```swift -PlayBackSDKManager.shared.initialize(apiKey: apiKey, baseURL: baseURL, userAgent: customUserAgent) { result in  - // Handle player UI error  -}  +PlayBackSDKManager.shared.initialize( + apiKey: apiKey, + baseURL: baseURL, + userAgent: customUserAgent +) { result in + // Handle player UI error +} ``` +By default the SDK uses system user agent, so if your app uses native URL Session, the `userAgent` parameter most likely can be omitted. - -**Resources:** +# Resources - **Tutorial:** [Tutorial](https://streamamg.github.io/playback-sdk-ios/tutorials/table-of-contents/#resources) - **Demo app:** [GitHub Repository](https://github.com/StreamAMG/playback-demo-ios) diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/InitializeSdkExample.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/InitializeSdkExample.swift index 49a8ca4..3e8c7ff 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/InitializeSdkExample.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/InitializeSdkExample.swift @@ -1,10 +1,3 @@ -// -// InitializeSdkExample.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// - import PlaybackSDK PlaybackSDKManager.shared.initialize(apiKey: "YOUR_API_KEY") { result in diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/InstallPlayerPluginTutorial.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/InstallPlayerPluginTutorial.swift index e8f4ab2..196268b 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/InstallPlayerPluginTutorial.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/InstallPlayerPluginTutorial.swift @@ -1,10 +1,3 @@ -// -// InstallPlayerPluginTutorial.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// - import Foundation PlayBackSDKManager.shared.initialize(apiKey: settingsManager.apiKey, baseURL: settingsManager.baseURL) { result in diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/LoadHlsStreamTutorial.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/LoadHlsStreamTutorial.swift index 93b6b5c..4b0e7e0 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/LoadHlsStreamTutorial.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/LoadHlsStreamTutorial.swift @@ -1,9 +1,3 @@ -// -// LoadHlsStreamTutorial.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// Swift diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/LoadPlayerViewTutorial.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/LoadPlayerViewTutorial.swift index 0df153c..42046f3 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/LoadPlayerViewTutorial.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/LoadPlayerViewTutorial.swift @@ -1,10 +1,3 @@ -// -// LoadPlayerViewTutorial.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// - import Foundation PlayBackSDKManager.shared.loadPlayer(entryID: settingsManager.entryId, authorizationToken: settingsManager.authorizationToken, onError: { error in diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackAPIError.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackAPIError.swift new file mode 100644 index 0000000..3bfb27d --- /dev/null +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackAPIError.swift @@ -0,0 +1,18 @@ +import Foundation + +public enum PlayBackAPIError: Error { + + case invalidResponsePlaybackData + + case invalidPlaybackDataURL + + case invalidPlayerInformationURL + + case initializationError + + case loadHLSStreamError + + case networkError(Error) + + case apiError(statusCode: Int, message: String) +} diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoApp.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoApp.swift index 7577ced..dc1847a 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoApp.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoApp.swift @@ -1,16 +1,9 @@ -// -// InitializeSdkExample.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// - import SwiftUI import PlaybackSDK @main struct PlayBackDemoApp: App { - + let sdkManager = PlayBackSDKManager() let apiKey = "API_KEY" var body: some Scene { @@ -18,7 +11,7 @@ struct PlayBackDemoApp: App { HomeView() } } - + init() { // Initialize the Playback SDK with the provided API key and base URL PlayBackSDKManager.shared.initialize(apiKey: apiKey) { result in @@ -26,16 +19,17 @@ struct PlayBackDemoApp: App { case .success(let license): // Obtained license upon successful initialization print("SDK initialized with license: \(license)") - + // Register the video player plugin let bitmovinPlugin = BitmovinPlayerPlugin() VideoPlayerPluginManager.shared.registerPlugin(bitmovinPlugin) - + case .failure(let error): // Print an error message and set initializationError flag upon initialization failure print("SDK initialization failed with error: \(error)") - + } } } } + diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoAppWithUserAgent.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoAppWithUserAgent.swift new file mode 100644 index 0000000..8a04146 --- /dev/null +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayBackDemoAppWithUserAgent.swift @@ -0,0 +1,38 @@ +import SwiftUI +import PlaybackSDK +import Alamofire + +@main +struct PlayBackDemoApp: App { + + let sdkManager = PlayBackSDKManager() + let apiKey = "API_KEY" + var body: some Scene { + WindowGroup { + HomeView() + } + } + + init() { + // Get the user-agent set by Alamofire + let userAgent = AF.session.configuration.httpAdditionalHeaders?["User-Agent"] + + // Initialize the Playback SDK with the provided API key and custom user-agent + PlayBackSDKManager.shared.initialize(apiKey: apiKey, userAgent: userAgent) { result in + switch result { + case .success(let license): + // Obtained license upon successful initialization + print("SDK initialized with license: \(license)") + + // Register the video player plugin + let bitmovinPlugin = BitmovinPlayerPlugin() + VideoPlayerPluginManager.shared.registerPlugin(bitmovinPlugin) + + case .failure(let error): + // Print an error message and set initializationError flag upon initialization failure + print("SDK initialization failed with error: \(error)") + + } + } + } +} diff --git a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayerTestView.swift b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayerTestView.swift index 3be8d23..07f1700 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Resources/PlayerTestView.swift +++ b/Sources/PlaybackSDK/Documentation.docc/Resources/PlayerTestView.swift @@ -1,10 +1,3 @@ -// -// LoadPlayerViewTutorial.swift -// -// -// Created by Franco Driansetti on 27/02/2024. -// - import SwiftUI import PlaybackSDK diff --git a/Sources/PlaybackSDK/Documentation.docc/Tutorial/GetStarted.tutorial b/Sources/PlaybackSDK/Documentation.docc/Tutorial/GetStarted.tutorial index f358321..75f5176 100644 --- a/Sources/PlaybackSDK/Documentation.docc/Tutorial/GetStarted.tutorial +++ b/Sources/PlaybackSDK/Documentation.docc/Tutorial/GetStarted.tutorial @@ -16,14 +16,20 @@ @Steps { @Step { - **Step 1:** Initialize the Playback SDK by providing your API key and register the default player plugin. + Initialize the Playback SDK by providing your API key and register the default player plugin. **Make sure this step is done when the app starts.** @Code(name: "PlayBackDemoApp.swift", file: PlayBackDemoApp.swift) } @Step { - **Step 2:** + Add custom `user-agent` header. + + This step is only required for content that needs a token, when using Alamofire or other 3rd party frameworks that overwrite the standard `user-agent` header with their own. + If the content requires starting a CloudPay session, it's important that the request to start the session has the same `user-agent` header as the video loading requests from the player. This can be achieved either by disabling the overwriting behaviour in the 3rd party networking framework you're using, or by passing a `userAgent` parameter to the `initialize` method, like in this example with Alamofire. + @Code(name: "PlayBackDemoAppWithUserAgent.swift", file: PlayBackDemoAppWithUserAgent.swift, previousFile: PlayBackDemoApp.swift) + } + @Step { Load the player using the Playback SDK and handle any playback errors. In this step, the code utilizes the **loadPlayer** function provided by the Playback SDK to initialize and load the video player. The function takes the entry ID and authorization token as parameters. Additionally, it includes a closure to handle any potential playback errors that may occur during the loading process. @@ -34,6 +40,12 @@ @Code(name: "PlayerTestView.swift", file: PlayerTestView.swift) } + @Step { + Handle the playback errors from Playback SDK. + + This step describes enum for error handling. Above is the error enum returned by the SDK, where the apiError also has the reason code and message for the API error. The playback API is returning the reason code in the response. For the list of the error codes and reasons, please refer to [Get Video Playback Data | Playback](https://streamamg.stoplight.io/docs/playback-documentation-portal/ec642e6dcbb13-get-video-playback-data) + @Code(name: "PlayBackAPIError.swift", file: PlayBackAPIError.swift) + } } } } diff --git a/Sources/PlaybackSDK/PrivacyInfo.xcprivacy b/Sources/PlaybackSDK/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..626ab20 --- /dev/null +++ b/Sources/PlaybackSDK/PrivacyInfo.xcprivacy @@ -0,0 +1,107 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeEmailAddress + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeProductPersonalization + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDataTypes + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherUsageData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePaymentInfo + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeProductPersonalization + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePerformanceData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePurchaseHistory + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeProductPersonalization + + + + NSPrivacyTracking + + + diff --git a/docs/data/documentation/playbacksdk.json b/docs/data/documentation/playbacksdk.json index 2b4493d..8f340b2 100644 --- a/docs/data/documentation/playbacksdk.json +++ b/docs/data/documentation/playbacksdk.json @@ -1 +1 @@ -{"metadata":{"role":"collection","symbolKind":"module","externalID":"PlaybackSDK","roleHeading":"Framework","title":"PlaybackSDK","modules":[{"name":"PlaybackSDK"}]},"identifier":{"url":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK","interfaceLanguage":"swift"},"sections":[],"hierarchy":{"paths":[[]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/playbacksdk"]}],"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://PlaybackSDK/documentation/PlaybackSDK":{"title":"PlaybackSDK","role":"collection","abstract":[],"type":"topic","kind":"symbol","url":"\/documentation\/playbacksdk","identifier":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK"}}} \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK"},"sections":[],"metadata":{"role":"collection","modules":[{"name":"PlaybackSDK"}],"roleHeading":"Framework","externalID":"PlaybackSDK","symbolKind":"module","title":"PlaybackSDK"},"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[[]]},"kind":"symbol","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/playbacksdk"]}],"references":{"doc://PlaybackSDK/documentation/PlaybackSDK":{"title":"PlaybackSDK","identifier":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK","kind":"symbol","url":"\/documentation\/playbacksdk","abstract":[],"role":"collection","type":"topic"}}} \ No newline at end of file diff --git a/docs/data/tutorials/playbacksdk/getstarted.json b/docs/data/tutorials/playbacksdk/getstarted.json index 1b4bd99..608854a 100644 --- a/docs/data/tutorials/playbacksdk/getstarted.json +++ b/docs/data/tutorials/playbacksdk/getstarted.json @@ -1,638 +1 @@ -{ - "sections": [ - { - "chapter": "Getting Started", - "estimatedTimeInMinutes": 30, - "title": "Playback SDK Overview", - "content": [ - { - "inlineContent": [ - { - "type": "text", - "text": "Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic." - } - ], - "type": "paragraph" - }, - { - "inlineContent": [ - { - "inlineContent": [ - { - "type": "text", - "text": "Key Features:" - } - ], - "type": "strong" - } - ], - "type": "paragraph" - }, - { - "items": [ - { - "content": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "Abstraction:" - } - ] - }, - { - "text": " Hides the complexities of underlying video APIs, allowing you to focus on the core playback experience.", - "type": "text" - } - ] - } - ] - }, - { - "content": [ - { - "inlineContent": [ - { - "inlineContent": [ - { - "text": "Flexibility:", - "type": "text" - } - ], - "type": "strong" - }, - { - "type": "text", - "text": " Supports different video providers and allows the creation of custom playback plugins for extended functionalities." - } - ], - "type": "paragraph" - } - ] - }, - { - "content": [ - { - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "Error Handling:" - } - ] - }, - { - "type": "text", - "text": " Provides mechanisms to handle potential issues during playback and notify your application." - } - ], - "type": "paragraph" - } - ] - } - ], - "type": "unorderedList" - } - ], - "kind": "hero" - }, - { - "tasks": [ - { - "title": "Playback SDK", - "stepsSection": [ - { - "content": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "text": "Step 1:", - "type": "text" - } - ] - }, - { - "type": "text", - "text": " Initialize the Playback SDK by providing your API key and register the default player plugin." - }, - { - "type": "text", - "text": " " - }, - { - "inlineContent": [ - { - "text": "Make sure this step is done when the app starts.", - "type": "text" - } - ], - "type": "strong" - } - ] - } - ], - "caption": [], - "type": "step", - "media": null, - "code": "PlayBackDemoApp.swift", - "runtimePreview": null - }, - { - "content": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "Step 2:" - } - ] - }, - { - "type": "text", - "text": "" - }, - { - "text": " ", - "type": "text" - }, - { - "type": "text", - "text": "Load the player using the Playback SDK and handle any playback errors." - } - ] - } - ], - "type": "step", - "media": null, - "code": "PlayerTestView.swift", - "runtimePreview": null, - "caption": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "text", - "text": "In this step, the code utilizes the " - }, - { - "type": "strong", - "inlineContent": [ - { - "text": "loadPlayer", - "type": "text" - } - ] - }, - { - "type": "text", - "text": " function provided by the Playback SDK to initialize and load the video player. The function takes the entry ID and authorization token as parameters. Additionally, it includes a closure to handle any potential playback errors that may occur during the loading process." - }, - { - "type": "text", - "text": " " - }, - { - "type": "text", - "text": "The " - }, - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "handlePlaybackError" - } - ] - }, - { - "type": "text", - "text": " function is called within the closure to handle the playback errors. It switches on the type of error received and provides appropriate error handling based on the type of error encountered." - }, - { - "type": "text", - "text": " " - }, - { - "type": "text", - "text": "The code also includes a placeholder comment to indicate where the removal of the player could be implemented in the " - }, - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "onDisappear" - } - ] - }, - { - "type": "text", - "text": " modifier." - }, - { - "type": "paragraph", - "inlineContent": [ - { - "type": "text", - "text": "If you want to allow users to access free content or if you're implementing a guest mode, you can pass an empty string or " - }, - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "nil" - } - ] - }, - { - "type": "text", - "text": " value as the " - }, - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "authorizationToken" - } - ] - }, - { - "type": "text", - "text": " when calling the " - }, - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "loadPlayer" - } - ] - }, - { - "type": "text", - "text": " function. This will bypass the need for authentication, enabling unrestricted access to the specified content." - } - ] - } - ] - } - ] - }, - { - "content": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "type": "text", - "text": "Step 3:" - } - ] - }, - { - "type": "text", - "text": "" - }, - { - "text": " ", - "type": "text" - }, - { - "type": "text", - "text": "Load the player using the Playback SDK and handle any playback errors." - } - ] - } - ], - "type": "step", - "media": null, - "code": "Errors.swift", - "runtimePreview": null, - "caption": [ - { - "type": "paragraph", - "inlineContent": [ - { - "type": "text", - "text": "In this step described enum for error handling. " - }, - { - "type": "text", - "text": "Above is the error enum returned by the SDK, in this the apiError also return the reason code and message for the API error. " - }, - { - "type": "text", - "text": "The playback API is returning the reason code in the response , refer " - }, - { - "overridingTitle": "Get Video Playback Data | Playback", - "type": "reference", - "identifier": "playback_link", - "isActive": true - } - ] - } - ] - } - ], - "anchor": "PlayBack-SDK", - "contentSection": [ - { - "content": [ - { - "inlineContent": [ - { - "type": "strong", - "inlineContent": [ - { - "text": "Explore how to use StreamAMG Playback SDK.", - "type": "text" - } - ] - } - ], - "type": "paragraph" - } - ], - "kind": "fullWidth" - } - ] - } - ], - "kind": "tasks" - } - ], - "hierarchy": { - "reference": "doc://PlaybackSDK/tutorials/Table-Of-Contents", - "modules": [ - { - "reference": "doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started", - "projects": [ - { - "reference": "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted", - "sections": [ - { - "kind": "task", - "reference": "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted#PlayBack-SDK" - } - ] - } - ] - } - ], - "paths": [ - [ - "doc://PlaybackSDK/tutorials/Table-Of-Contents", - "doc://PlaybackSDK/tutorials/Table-Of-Contents/$volume", - "doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started" - ] - ] - }, - "kind": "project", - "metadata": { - "title": "Playback SDK Overview", - "category": "PlaybackSDK Tutorial", - "categoryPathComponent": "Table-Of-Contents", - "role": "project" - }, - "schemaVersion": { - "major": 0, - "minor": 3, - "patch": 0 - }, - "variants": [ - { - "traits": [ - { - "interfaceLanguage": "swift" - } - ], - "paths": [ - "/tutorials/playbacksdk/getstarted" - ] - } - ], - "identifier": { - "interfaceLanguage": "swift", - "url": "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted" - }, - "references": { - "PlayerTestView.swift": { - "identifier": "PlayerTestView.swift", - "content": [ - "//", - "// LoadPlayerViewTutorial.swift", - "//", - "//", - "// Created by Franco Driansetti on 27/02/2024.", - "//", - "", - "import SwiftUI", - "import PlaybackSDK", - "", - "struct PlayerTestView: View {", - " ", - " private let entryID = \"ENTRY_ID\"", - " private let authorizationToken = \"JWT_TOKEN\"", - " ", - " var body: some View {", - " VStack {", - " // Load player with the playback SDK", - " PlayBackSDKManager.shared.loadPlayer(entryID: entryID, authorizationToken: authorizationToken) { error in", - " handlePlaybackError(error)", - " }", - " .onDisappear {", - " // Remove the player here", - " }", - " Spacer()", - " }", - " .padding()", - " }", - " ", - " private func handlePlaybackError(_ error: PlaybackError) {", - " switch error {", - " case .apiError(let statusCode, let errorMessage, let reason):", - " print(\"\\(errorMessage) Status Code \\(statusCode)\")", - " errorMessage = \"\\(errorMessage) Status Code \\(statusCode) Reason \\(reason)\"", - " default:", - " print(\"Error loading HLS stream in PlaybackUIView: \\(error.localizedDescription)\")", - " errorMessage = \"Error code and errorrMessage not found: \\(error.localizedDescription)\"", - " }", - " }", - " ", - "}" - ], - "syntax": "swift", - "fileType": "swift", - "highlights": [], - "fileName": "PlayerTestView.swift", - "type": "file" - }, - "Errors.swift": { - "identifier": "Errors.swift", - "highlights": [], - "fileType": "swift", - "type": "file", - "syntax": "swift", - "fileName": "Errors.swift", - "content": [ - "", - "public enum PlayBackAPIError: Error {", - "", - " case invalidResponsePlaybackData", - "", - " case invalidPlaybackDataURL", - "", - " case invalidPlayerInformationURL", - "", - " case initializationError", - "", - " case loadHLSStreamError", - "", - " case networkError(Error)", - "", - " case apiError(statusCode: Int, message: String)", - "", - "}" - ] - }, - "PlayBackDemoApp.swift": { - "identifier": "PlayBackDemoApp.swift", - "highlights": [], - "fileType": "swift", - "type": "file", - "syntax": "swift", - "fileName": "PlayBackDemoApp.swift", - "content": [ - "//", - "// InitializeSdkExample.swift", - "//", - "//", - "// Created by Franco Driansetti on 27/02/2024.", - "//", - "", - "import SwiftUI", - "import PlaybackSDK", - "", - "@main", - "struct PlayBackDemoApp: App {", - " ", - " let sdkManager = PlayBackSDKManager()", - " let apiKey = \"API_KEY\"", - " var body: some Scene {", - " WindowGroup {", - " HomeView()", - " }", - " }", - " ", - " init() {", - " // Initialize the Playback SDK with the provided API key and base URL", - " PlayBackSDKManager.shared.initialize(apiKey: apiKey) { result in", - " switch result {", - " case .success(let license):", - " // Obtained license upon successful initialization", - " print(\"SDK initialized with license: \\(license)\")", - " ", - " // Register the video player plugin", - " let bitmovinPlugin = BitmovinPlayerPlugin()", - " VideoPlayerPluginManager.shared.registerPlugin(bitmovinPlugin)", - " ", - " case .failure(let error):", - " // Print an error message and set initializationError flag upon initialization failure", - " print(\"SDK initialization failed with error: \\(error)\")", - " ", - " }", - " }", - " }", - "}" - ] - }, - "doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started": { - "title": "Getting Started", - "identifier": "doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started", - "role": "article", - "url": "/tutorials/table-of-contents/getting-started", - "abstract": [], - "kind": "article", - "type": "topic" - }, - "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted": { - "title": "Playback SDK Overview", - "abstract": [ - { - "text": "Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic.", - "type": "text" - } - ], - "identifier": "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted", - "url": "/tutorials/playbacksdk/getstarted", - "kind": "project", - "role": "project", - "estimatedTime": "30min", - "type": "topic" - }, - "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted#PlayBack-SDK": { - "title": "Playback SDK", - "role": "pseudoSymbol", - "type": "section", - "url": "/tutorials/playbacksdk/getstarted#PlayBack-SDK", - "kind": "section", - "identifier": "doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted#PlayBack-SDK", - "abstract": [ - { - "text": "Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic.", - "type": "text" - } - ] - }, - "playback_link": { - "title": "Get Video Playback Data | Playback", - "role": "overview", - "type": "topic", - "role": "overview", - "url": "https://streamamg.stoplight.io/docs/playback-documentation-portal/ec642e6dcbb13-get-video-playback-data", - "kind": "section", - "identifier": "Get Video Playback Data | Playback ", - "abstract": [ - { - "text": "Get Video Playback Data | Playback", - "type": "text" - } - ] - }, - "doc://PlaybackSDK/tutorials/Table-Of-Contents": { - "identifier": "doc://PlaybackSDK/tutorials/Table-Of-Contents", - "kind": "overview", - "role": "overview", - "abstract": [ - { - "text": "Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications.", - "type": "text" - } - ], - "url": "/tutorials/table-of-contents", - "title": "Introduction to PlaybackSDK", - "type": "topic" - } - } - } \ No newline at end of file +{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/tutorials\/playbacksdk\/getstarted"]}],"metadata":{"categoryPathComponent":"Table-Of-Contents","role":"project","title":"Playback SDK Overview","category":"PlaybackSDK Tutorial"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"project","sections":[{"kind":"hero","chapter":"Getting Started","estimatedTimeInMinutes":30,"title":"Playback SDK Overview","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic."}]},{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Key Features:"}]}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Abstraction:"}],"type":"strong"},{"type":"text","text":" Hides the complexities of underlying video APIs, allowing you to focus on the core playback experience."}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"Flexibility:","type":"text"}]},{"text":" Supports different video providers and allows the creation of custom playback plugins for extended functionalities.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Error Handling:"}]},{"type":"text","text":" Provides mechanisms to handle potential issues during playback and notify your application."}],"type":"paragraph"}]}]}]},{"tasks":[{"title":"Playback SDK","contentSection":[{"kind":"fullWidth","content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"text":"Explore how to use StreamAMG Playback SDK.","type":"text"}],"type":"strong"}]}]}],"anchor":"Playback-SDK","stepsSection":[{"code":"PlayBackDemoApp.swift","caption":[],"type":"step","runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Initialize the Playback SDK by providing your API key and register the default player plugin."},{"text":" ","type":"text"},{"inlineContent":[{"type":"text","text":"Make sure this step is done when the app starts."}],"type":"strong"}]}],"media":null},{"caption":[{"inlineContent":[{"type":"text","text":"This step is only required for content that needs a token, when using Alamofire or other 3rd party frameworks that overwrite the standard "},{"type":"codeVoice","code":"user-agent"},{"text":" header with their own.","type":"text"},{"type":"text","text":"\n"},{"text":"If the content requires starting a CloudPay session, it’s important that the request to start the session has the same ","type":"text"},{"type":"codeVoice","code":"user-agent"},{"text":" header as the video loading requests from the player. This can be achieved either by disabling the overwriting behaviour in the 3rd party networking framework you’re using, or by passing a ","type":"text"},{"code":"userAgent","type":"codeVoice"},{"type":"text","text":" parameter to the "},{"type":"codeVoice","code":"initialize"},{"type":"text","text":" method, like in this example with Alamofire."}],"type":"paragraph"}],"media":null,"code":"PlayBackDemoAppWithUserAgent.swift","type":"step","runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"text":"Add custom ","type":"text"},{"type":"codeVoice","code":"user-agent"},{"type":"text","text":" header."}]}]},{"media":null,"caption":[{"inlineContent":[{"type":"text","text":"In this step, the code utilizes the "},{"inlineContent":[{"text":"loadPlayer","type":"text"}],"type":"strong"},{"type":"text","text":" function provided by the Playback SDK to initialize and load the video player. The function takes the entry ID and authorization token as parameters. Additionally, it includes a closure to handle any potential playback errors that may occur during the loading process."},{"type":"text","text":" "},{"type":"text","text":"The "},{"inlineContent":[{"text":"handlePlaybackError","type":"text"}],"type":"strong"},{"text":" function is called within the closure to handle the playback errors. It switches on the type of error received and provides appropriate error handling based on the type of error encountered.","type":"text"},{"type":"text","text":" "},{"type":"text","text":"The code also includes a placeholder comment to indicate where the removal of the player could be implemented in the "},{"inlineContent":[{"type":"text","text":"onDisappear"}],"type":"strong"},{"type":"text","text":" modifier."},{"type":"text","text":" "},{"text":"If you want to allow users to access free content or if you’re implementing a guest mode, you can pass an empty string or ","type":"text"},{"inlineContent":[{"text":"nil","type":"text"}],"type":"strong"},{"text":" value as the ","type":"text"},{"type":"strong","inlineContent":[{"text":"authorizationToken","type":"text"}]},{"type":"text","text":" when calling the "},{"inlineContent":[{"text":"loadPlayer","type":"text"}],"type":"strong"},{"type":"text","text":" function. This will bypass the need for authentication, enabling unrestricted access to the specified content."}],"type":"paragraph"}],"runtimePreview":null,"type":"step","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Load the player using the Playback SDK and handle any playback errors."}]}],"code":"PlayerTestView.swift"},{"caption":[{"inlineContent":[{"text":"This step describes enum for error handling. Above is the error enum returned by the SDK, where the apiError also has the reason code and message for the API error. The playback API is returning the reason code in the response. For the list of the error codes and reasons, please refer to ","type":"text"},{"isActive":true,"identifier":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data","type":"reference"}],"type":"paragraph"}],"code":"PlayBackAPIError.swift","media":null,"runtimePreview":null,"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Handle the playback errors from Playback SDK."}]}],"type":"step"}]}],"kind":"tasks"}],"hierarchy":{"paths":[["doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/$volume","doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started"]],"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","modules":[{"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started","projects":[{"reference":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","sections":[{"kind":"task","reference":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted#Playback-SDK"}]}]}]},"references":{"https://streamamg.stoplight.io/docs/playback-documentation-portal/ec642e6dcbb13-get-video-playback-data":{"url":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data","type":"link","title":"Get Video Playback Data | Playback","titleInlineContent":[{"text":"Get Video Playback Data | Playback","type":"text"}],"identifier":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data"},"doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started":{"abstract":[],"title":"Getting Started","identifier":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started","type":"topic","kind":"article","role":"article","url":"\/tutorials\/table-of-contents\/getting-started"},"doc://PlaybackSDK/tutorials/Table-Of-Contents":{"identifier":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","kind":"overview","role":"overview","type":"topic","url":"\/tutorials\/table-of-contents","abstract":[{"type":"text","text":"Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications."}],"title":"Introduction to PlaybackSDK"},"PlayBackAPIError.swift":{"highlights":[],"content":["import Foundation","","public enum PlayBackAPIError: Error {",""," case invalidResponsePlaybackData",""," case invalidPlaybackDataURL",""," case invalidPlayerInformationURL",""," case initializationError",""," case loadHLSStreamError",""," case networkError(Error)",""," case apiError(statusCode: Int, message: String)","}"],"fileName":"PlayBackAPIError.swift","type":"file","fileType":"swift","syntax":"swift","identifier":"PlayBackAPIError.swift"},"doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted":{"estimatedTime":"30min","abstract":[{"type":"text","text":"Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic."}],"url":"\/tutorials\/playbacksdk\/getstarted","identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","kind":"project","type":"topic","title":"Playback SDK Overview","role":"project"},"PlayerTestView.swift":{"syntax":"swift","fileName":"PlayerTestView.swift","highlights":[],"identifier":"PlayerTestView.swift","fileType":"swift","type":"file","content":["import SwiftUI","import PlaybackSDK","","struct PlayerTestView: View {"," "," private let entryID = \"ENTRY_ID\""," private let authorizationToken = \"JWT_TOKEN\""," "," var body: some View {"," VStack {"," \/\/ Load player with the playback SDK"," PlayBackSDKManager.shared.loadPlayer(entryID: entryID, authorizationToken: authorizationToken) { error in"," handlePlaybackError(error)"," }"," .onDisappear {"," \/\/ Remove the player here"," }"," Spacer()"," }"," .padding()"," }"," "," private func handlePlaybackError(_ error: PlaybackError) {"," switch error {"," case .apiError(let statusCode, let errorMessage, let reason):"," print(\"\\(errorMessage) Status Code \\(statusCode)\")"," errorMessage = \"\\(errorMessage) Status Code \\(statusCode) Reason \\(reason)\""," default:"," print(\"Error loading HLS stream in PlaybackUIView: \\(error.localizedDescription)\")"," errorMessage = \"Error code and errorrMessage not found: \\(error.localizedDescription)\""," }"," }"," ","}"]},"doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted#Playback-SDK":{"url":"\/tutorials\/playbacksdk\/getstarted#Playback-SDK","abstract":[{"text":"Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic.","type":"text"}],"identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted#Playback-SDK","kind":"section","type":"section","title":"Playback SDK","role":"pseudoSymbol"},"PlayBackDemoApp.swift":{"syntax":"swift","fileName":"PlayBackDemoApp.swift","highlights":[],"identifier":"PlayBackDemoApp.swift","fileType":"swift","type":"file","content":["import SwiftUI","import PlaybackSDK","","@main","struct PlayBackDemoApp: App {",""," let sdkManager = PlayBackSDKManager()"," let apiKey = \"API_KEY\""," var body: some Scene {"," WindowGroup {"," HomeView()"," }"," }",""," init() {"," \/\/ Initialize the Playback SDK with the provided API key and base URL"," PlayBackSDKManager.shared.initialize(apiKey: apiKey) { result in"," switch result {"," case .success(let license):"," \/\/ Obtained license upon successful initialization"," print(\"SDK initialized with license: \\(license)\")",""," \/\/ Register the video player plugin"," let bitmovinPlugin = BitmovinPlayerPlugin()"," VideoPlayerPluginManager.shared.registerPlugin(bitmovinPlugin)",""," case .failure(let error):"," \/\/ Print an error message and set initializationError flag upon initialization failure"," print(\"SDK initialization failed with error: \\(error)\")",""," }"," }"," }","}",""]},"PlayBackDemoAppWithUserAgent.swift":{"syntax":"swift","fileName":"PlayBackDemoAppWithUserAgent.swift","highlights":[{"line":3},{"line":17},{"line":18},{"line":19},{"line":20},{"line":21}],"identifier":"PlayBackDemoAppWithUserAgent.swift","fileType":"swift","type":"file","content":["import SwiftUI","import PlaybackSDK","import Alamofire","","@main","struct PlayBackDemoApp: App {",""," let sdkManager = PlayBackSDKManager()"," let apiKey = \"API_KEY\""," var body: some Scene {"," WindowGroup {"," HomeView()"," }"," }",""," init() {"," \/\/ Get the user-agent set by Alamofire"," let userAgent = AF.session.configuration.httpAdditionalHeaders?[\"User-Agent\"]",""," \/\/ Initialize the Playback SDK with the provided API key and custom user-agent"," PlayBackSDKManager.shared.initialize(apiKey: apiKey, userAgent: userAgent) { result in"," switch result {"," case .success(let license):"," \/\/ Obtained license upon successful initialization"," print(\"SDK initialized with license: \\(license)\")",""," \/\/ Register the video player plugin"," let bitmovinPlugin = BitmovinPlayerPlugin()"," VideoPlayerPluginManager.shared.registerPlugin(bitmovinPlugin)",""," case .failure(let error):"," \/\/ Print an error message and set initializationError flag upon initialization failure"," print(\"SDK initialization failed with error: \\(error)\")",""," }"," }"," }","}"]}}} \ No newline at end of file diff --git a/docs/data/tutorials/table-of-contents.json b/docs/data/tutorials/table-of-contents.json index f653b1b..2785770 100644 --- a/docs/data/tutorials/table-of-contents.json +++ b/docs/data/tutorials/table-of-contents.json @@ -1 +1 @@ -{"metadata":{"category":"PlaybackSDK Tutorial","title":"Introduction to PlaybackSDK","estimatedTime":"30min","categoryPathComponent":"Table-Of-Contents","role":"overview"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents"},"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications."}]}],"action":{"identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","type":"reference","isActive":true,"overridingTitle":"Get started","overridingTitleInlineContent":[{"text":"Get started","type":"text"}]},"kind":"hero","title":"Introduction to PlaybackSDK"},{"name":null,"kind":"volume","chapters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"In this chapter, we’ll start by setting up the PlaybackSDK from the initialisation to load the Playback Player Plugin.","type":"text"}]}],"name":"Getting Started","image":"ios-marketing.png","tutorials":["doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted"]}],"image":null,"content":[]},{"tiles":[{"identifier":"documentation","title":"Documentation","content":[{"inlineContent":[{"text":"Browse and search the PlaybackSDK documentation.","type":"text"}],"type":"paragraph"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"reference","identifier":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","isActive":true}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"isActive":true,"identifier":"https:\/\/streamamg.stoplight.io","type":"reference"}]}]}]}]}],"content":[{"inlineContent":[{"type":"text","text":"Explore more resources for learning about PlaybackSDK."}],"type":"paragraph"}],"kind":"resources"}],"hierarchy":{"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","paths":[]},"kind":"overview","variants":[{"paths":["\/tutorials\/table-of-contents"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"ios-marketing.png":{"variants":[{"url":"\/images\/ios-marketing.png","traits":["1x","light"]}],"identifier":"ios-marketing.png","type":"image","alt":"Getting Started with PlaybackSDK"},"https://streamamg.stoplight.io":{"identifier":"https:\/\/streamamg.stoplight.io","title":"Stoplight Playback API","titleInlineContent":[{"text":"Stoplight Playback API","type":"text"}],"url":"https:\/\/streamamg.stoplight.io","type":"link"},"doc://PlaybackSDK/tutorials/Table-Of-Contents":{"identifier":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","kind":"overview","role":"overview","abstract":[{"text":"Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications.","type":"text"}],"url":"\/tutorials\/table-of-contents","title":"Introduction to PlaybackSDK","type":"topic"},"doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted":{"title":"Playback SDK Overview","abstract":[{"text":"Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic.","type":"text"}],"identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","url":"\/tutorials\/playbacksdk\/getstarted","kind":"project","role":"project","estimatedTime":"30min","type":"topic"},"https://github.com/StreamAMG/playback-sdk-ios/tree/main":{"identifier":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","title":"GitHub Repository","url":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","titleInlineContent":[{"text":"GitHub Repository","type":"text"}],"type":"link"}}} \ No newline at end of file +{"identifier":{"url":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","interfaceLanguage":"swift"},"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/tutorials\/table-of-contents"]}],"sections":[{"kind":"hero","content":[{"inlineContent":[{"text":"Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications.","type":"text"}],"type":"paragraph"}],"title":"Introduction to PlaybackSDK","action":{"overridingTitle":"Get started","overridingTitleInlineContent":[{"type":"text","text":"Get started"}],"identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","isActive":true,"type":"reference"}},{"name":null,"kind":"volume","content":[],"chapters":[{"content":[{"inlineContent":[{"type":"text","text":"In this chapter, we’ll start by setting up the PlaybackSDK from the initialisation to load the PlayBack Player Plugin."}],"type":"paragraph"}],"tutorials":["doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted"],"name":"Getting Started","image":"ios-marketing.png"}],"image":null},{"kind":"resources","content":[{"inlineContent":[{"text":"Explore more resources for learning about PlaybackSDK.","type":"text"}],"type":"paragraph"}],"tiles":[{"identifier":"documentation","title":"Documentation","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Browse and search the PlaybackSDK documentation."}]},{"items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"reference","identifier":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","isActive":true}]}]},{"content":[{"type":"paragraph","inlineContent":[{"isActive":true,"identifier":"https:\/\/streamamg.stoplight.io","type":"reference"}]}]}],"type":"unorderedList"}]}]}],"hierarchy":{"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","paths":[]},"metadata":{"estimatedTime":"30min","category":"PlaybackSDK Tutorial","title":"Introduction to PlaybackSDK","categoryPathComponent":"Table-Of-Contents","role":"overview"},"kind":"overview","references":{"doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted":{"estimatedTime":"30min","abstract":[{"type":"text","text":"Playback SDK simplifies integrating video playback functionalities into OTT applications. It provides a unified interface for interacting with video APIs and managing playback logic."}],"url":"\/tutorials\/playbacksdk\/getstarted","identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","kind":"project","type":"topic","title":"Playback SDK Overview","role":"project"},"https://streamamg.stoplight.io":{"type":"link","titleInlineContent":[{"type":"text","text":"Stoplight PlayBack API"}],"url":"https:\/\/streamamg.stoplight.io","identifier":"https:\/\/streamamg.stoplight.io","title":"Stoplight PlayBack API"},"ios-marketing.png":{"type":"image","variants":[{"traits":["1x","light"],"url":"\/images\/ios-marketing.png"}],"identifier":"ios-marketing.png","alt":"Getting Started with PlaybackSDK"},"doc://PlaybackSDK/tutorials/Table-Of-Contents":{"identifier":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","kind":"overview","role":"overview","type":"topic","url":"\/tutorials\/table-of-contents","abstract":[{"type":"text","text":"Welcome to the PlaybackSDK tutorial! In this tutorial, you will learn how to integrate and use the PlaybackSDK in your iOS applications."}],"title":"Introduction to PlaybackSDK"},"https://github.com/StreamAMG/playback-sdk-ios/tree/main":{"titleInlineContent":[{"type":"text","text":"GitHub Repository"}],"type":"link","url":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","title":"GitHub Repository","identifier":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main"}}} \ No newline at end of file diff --git a/docs/metadata.json b/docs/metadata.json index 2820538..6633899 100644 --- a/docs/metadata.json +++ b/docs/metadata.json @@ -1 +1 @@ -{"bundleIdentifier":"PlaybackSDK","bundleDisplayName":"PlaybackSDK","schemaVersion":{"major":0,"patch":0,"minor":1}} \ No newline at end of file +{"schemaVersion":{"patch":0,"major":0,"minor":1},"bundleDisplayName":"PlaybackSDK","bundleIdentifier":"PlaybackSDK"} \ No newline at end of file diff --git a/docs/theme-settings.json b/docs/theme-settings.json deleted file mode 100644 index 0fd159a..0000000 --- a/docs/theme-settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "theme": { - "color": { - "documentation-intro-fill": "rebeccapurple" - } - } -}