diff --git a/docs/data/documentation/playbacksdk.json b/docs/data/documentation/playbacksdk.json index adba963..8f340b2 100644 --- a/docs/data/documentation/playbacksdk.json +++ b/docs/data/documentation/playbacksdk.json @@ -1 +1 @@ -{"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[[]]},"identifier":{"url":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK","interfaceLanguage":"swift"},"metadata":{"title":"PlaybackSDK","modules":[{"name":"PlaybackSDK"}],"role":"collection","symbolKind":"module","externalID":"PlaybackSDK","roleHeading":"Framework"},"sections":[],"variants":[{"paths":["\/documentation\/playbacksdk"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://PlaybackSDK/documentation/PlaybackSDK":{"identifier":"doc:\/\/PlaybackSDK\/documentation\/PlaybackSDK","url":"\/documentation\/playbacksdk","kind":"symbol","title":"PlaybackSDK","type":"topic","role":"collection","abstract":[]}}} \ 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 19bd758..608854a 100644 --- a/docs/data/tutorials/playbacksdk/getstarted.json +++ b/docs/data/tutorials/playbacksdk/getstarted.json @@ -1 +1 @@ -{"sections":[{"kind":"hero","estimatedTimeInMinutes":30,"content":[{"type":"paragraph","inlineContent":[{"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"}]},{"inlineContent":[{"type":"strong","inlineContent":[{"text":"Key Features:","type":"text"}]}],"type":"paragraph"},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"text":"Abstraction:","type":"text"}]},{"type":"text","text":" Hides the complexities of underlying video APIs, allowing you to focus on the core playback experience."}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Flexibility:"}],"type":"strong"},{"text":" Supports different video providers and allows the creation of custom playback plugins for extended functionalities.","type":"text"}]}]},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Error Handling:"}]},{"text":" Provides mechanisms to handle potential issues during playback and notify your application.","type":"text"}],"type":"paragraph"}]}]}],"title":"Playback SDK Overview","chapter":"Getting Started"},{"tasks":[{"stepsSection":[{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Step 1:"}],"type":"strong"},{"type":"text","text":" Initialize the Playback SDK by providing your API key and register the default player plugin."},{"type":"text","text":" "},{"type":"strong","inlineContent":[{"type":"text","text":"Make sure this step is done when the app starts."}]}]}],"code":"PlayBackDemoApp.swift","runtimePreview":null,"caption":[],"media":null,"type":"step"},{"content":[{"inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Step 2:"}]},{"text":"","type":"text"},{"text":" ","type":"text"},{"text":"Load the player using the Playback SDK and handle any playback errors.","type":"text"}],"type":"paragraph"}],"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."},{"text":" ","type":"text"},{"type":"text","text":"The "},{"type":"strong","inlineContent":[{"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"},{"type":"text","text":" "},{"text":"The code also includes a placeholder comment to indicate where the removal of the player could be implemented in the ","type":"text"},{"type":"strong","inlineContent":[{"text":"onDisappear","type":"text"}]},{"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"},{"type":"strong","inlineContent":[{"type":"text","text":"nil"}]},{"type":"text","text":" value as the "},{"inlineContent":[{"text":"authorizationToken","type":"text"}],"type":"strong"},{"type":"text","text":" when calling the "},{"inlineContent":[{"type":"text","text":"loadPlayer"}],"type":"strong"},{"type":"text","text":" function. This will bypass the need for authentication, enabling unrestricted access to the specified content."}]}],"media":null,"code":"PlayerTestView.swift","runtimePreview":null,"type":"step"},{"type":"step","code":"PlayBackAPIError.swift","runtimePreview":null,"caption":[{"type":"paragraph","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"},{"type":"reference","identifier":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data","isActive":true}]}],"content":[{"type":"paragraph","inlineContent":[{"type":"strong","inlineContent":[{"type":"text","text":"Step 3:"}]},{"type":"text","text":" "},{"text":"Handle the playback errors from Playback SDK.","type":"text"}]}],"media":null}],"anchor":"Playback-SDK","contentSection":[{"content":[{"type":"paragraph","inlineContent":[{"inlineContent":[{"type":"text","text":"Explore how to use StreamAMG Playback SDK."}],"type":"strong"}]}],"kind":"fullWidth"}],"title":"Playback SDK"}],"kind":"tasks"}],"metadata":{"category":"PlaybackSDK Tutorial","role":"project","categoryPathComponent":"Table-Of-Contents","title":"Playback SDK Overview"},"variants":[{"paths":["\/tutorials\/playbacksdk\/getstarted"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/$volume","doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started"]],"modules":[{"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started","projects":[{"reference":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","sections":[{"reference":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted#Playback-SDK","kind":"task"}]}]}],"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted"},"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"project","references":{"doc://PlaybackSDK/tutorials/PlaybackSDK/GetStarted#Playback-SDK":{"type":"section","url":"\/tutorials\/playbacksdk\/getstarted#Playback-SDK","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."}],"role":"pseudoSymbol","kind":"section","identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted#Playback-SDK","title":"Playback SDK"},"PlayBackDemoApp.swift":{"highlights":[],"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)\")"," "," }"," }"," }","}"],"syntax":"swift","fileType":"swift","identifier":"PlayBackDemoApp.swift","type":"file","fileName":"PlayBackDemoApp.swift"},"PlayerTestView.swift":{"fileType":"swift","syntax":"swift","type":"file","highlights":[],"fileName":"PlayerTestView.swift","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)\""," }"," }"," ","}"],"identifier":"PlayerTestView.swift"},"doc://PlaybackSDK/tutorials/Table-Of-Contents":{"url":"\/tutorials\/table-of-contents","title":"Introduction to PlaybackSDK","role":"overview","type":"topic","kind":"overview","identifier":"doc:\/\/PlaybackSDK\/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."}]},"https://streamamg.stoplight.io/docs/playback-documentation-portal/ec642e6dcbb13-get-video-playback-data":{"identifier":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data","type":"link","title":"Get Video Playback Data | Playback","titleInlineContent":[{"type":"text","text":"Get Video Playback Data | Playback"}],"url":"https:\/\/streamamg.stoplight.io\/docs\/playback-documentation-portal\/ec642e6dcbb13-get-video-playback-data"},"PlayBackAPIError.swift":{"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)","}"],"fileType":"swift","identifier":"PlayBackAPIError.swift","syntax":"swift","highlights":[],"type":"file","fileName":"PlayBackAPIError.swift"},"doc://PlaybackSDK/tutorials/Table-Of-Contents/Getting-Started":{"type":"topic","identifier":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents\/Getting-Started","kind":"article","url":"\/tutorials\/table-of-contents\/getting-started","abstract":[],"title":"Getting Started","role":"article"},"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"}],"url":"\/tutorials\/playbacksdk\/getstarted","type":"topic","kind":"project","estimatedTime":"30min","identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","role":"project"}}} \ 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 f9a35ad..2785770 100644 --- a/docs/data/tutorials/table-of-contents.json +++ b/docs/data/tutorials/table-of-contents.json @@ -1 +1 @@ -{"hierarchy":{"reference":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","paths":[]},"identifier":{"url":"doc:\/\/PlaybackSDK\/tutorials\/Table-Of-Contents","interfaceLanguage":"swift"},"metadata":{"category":"PlaybackSDK Tutorial","estimatedTime":"30min","categoryPathComponent":"Table-Of-Contents","role":"overview","title":"Introduction to PlaybackSDK"},"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[{"action":{"identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","isActive":true,"overridingTitle":"Get started","overridingTitleInlineContent":[{"type":"text","text":"Get started"}],"type":"reference"},"kind":"hero","title":"Introduction to PlaybackSDK","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."}]}]},{"content":[],"kind":"volume","chapters":[{"name":"Getting Started","image":"ios-marketing.png","tutorials":["doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted"],"content":[{"inlineContent":[{"text":"In this chapter, we’ll start by setting up the PlaybackSDK from the initialisation to load the PlayBack Player Plugin.","type":"text"}],"type":"paragraph"}]}],"name":null,"image":null},{"kind":"resources","tiles":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Browse and search the PlaybackSDK documentation."}]},{"type":"unorderedList","items":[{"content":[{"inlineContent":[{"identifier":"https:\/\/github.com\/StreamAMG\/playback-sdk-ios\/tree\/main","type":"reference","isActive":true}],"type":"paragraph"}]},{"content":[{"type":"paragraph","inlineContent":[{"identifier":"https:\/\/streamamg.stoplight.io","isActive":true,"type":"reference"}]}]}]}],"identifier":"documentation","title":"Documentation"}],"content":[{"type":"paragraph","inlineContent":[{"text":"Explore more resources for learning about PlaybackSDK.","type":"text"}]}]}],"variants":[{"paths":["\/tutorials\/table-of-contents"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"overview","references":{"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","type":"link","titleInlineContent":[{"text":"GitHub Repository","type":"text"}]},"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"}],"url":"\/tutorials\/playbacksdk\/getstarted","type":"topic","kind":"project","estimatedTime":"30min","identifier":"doc:\/\/PlaybackSDK\/tutorials\/PlaybackSDK\/GetStarted","role":"project"},"ios-marketing.png":{"variants":[{"traits":["1x","light"],"url":"\/images\/ios-marketing.png"}],"alt":"Getting Started with PlaybackSDK","identifier":"ios-marketing.png","type":"image"},"doc://PlaybackSDK/tutorials/Table-Of-Contents":{"url":"\/tutorials\/table-of-contents","title":"Introduction to PlaybackSDK","role":"overview","type":"topic","kind":"overview","identifier":"doc:\/\/PlaybackSDK\/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."}]},"https://streamamg.stoplight.io":{"title":"Stoplight PlayBack API","url":"https:\/\/streamamg.stoplight.io","titleInlineContent":[{"text":"Stoplight PlayBack API","type":"text"}],"identifier":"https:\/\/streamamg.stoplight.io","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