A THEOplayer rendered in a UIViewController, with the FastPix THEOplayer SDK
(THEOplayerWrapper) attached for playback analytics.
open FastPixTHEOUIKitExample.xcodeprojPick a Simulator (or your device), press ▶ Run, tap a sample stream, then
open dashboard.fastpix.com → your workspace to
watch views appear. The project references the SDK as a local Swift package at
../.., so it builds against this checkout. First open resolves THEOplayer's
binary framework over the network — let it finish.
static let workspaceKey = "1029207880411545601" // dashboard.fastpix.com → Workspaces
static let theoLicense = "YOUR_THEOPLAYER_LICENSE" // portal.theoplayer.com → SDKs → iOStheoLicenseis required for playback. THEOplayer licenses are bound to a bundle id — create one forcom.fastpix.datasdk.theo.uikit(or change the bundle id to match your license). With the placeholder in place the app runs but shows a red "Add your THEOplayer license to play" badge and the player stays black.workspaceKeyselects the FastPix workspace analytics are sent to.
| File | Role |
|---|---|
PlayerViewController.swift |
Creates the THEOplayer with the license config, attaches the SDK via tracker.trackTheoPlayer(...), sets the source, and tears down in deinit. |
HomeViewController.swift |
Landing list of sample streams. |
Config.swift |
Workspace key, THEOplayer license, and sample streams. |
AppDelegate.swift |
App entry point (programmatic window). |
let builder = THEOplayerConfigurationBuilder()
builder.license = Config.theoLicense
let player = THEOplayer(configuration: builder.build())
player.addAsSubview(of: containerView)
// All metadata fields live under the "data" key.
let tracker = THEOplayerTracker()
tracker.trackTheoPlayer(player: player, customMetadata: ["data": fields], automaticErrorTracking: true)
player.source = SourceDescription(source: TypedSource(src: url, type: "application/x-mpegurl"))
player.play()