One Logo Pool Ball
ImmersiveMediaSupport · IOS API REFERENCE

PresentationDescriptorReader

class · iOS 26.4+ · SDK 27.1

class PresentationDescriptorReader

An object that provides an app the functionality it needs to understand and process immersive presentation commands. Immersive commands are an array of ``PresentationCommand`` in a ``PresentationDescriptor``. This object is used during an Immersive Video playback as a source of rendering values its published variables, or the app can pull presentation commands by time to write an output metadata track.

Members (15)

init · iOS 26.4+

init

TypeScript
static init(presentationDescriptor: PresentationDescriptor, isSideloaded?: boolean): PresentationDescriptorReader
Swift declaration
init(presentationDescriptor: PresentationDescriptor, isSideloaded: Bool = false)

Initializes an instance that contains the specified presentation descriptor. - Parameter presentationDescriptor: The current presentation commands to use or parse. - Parameter isSideloaded: Signals the player this is a sideloaded dynamic metadata and not real-time - in that case the player will not delete old commands as playback continues (to support seek)

get · iOS 26.4+

presentationDescriptor

TypeScript
get presentationDescriptor(): PresentationDescriptor
Swift declaration
var presentationDescriptor: PresentationDescriptor { get }

The presentation descriptor that contains the presentation commands to process.

method · iOS 26.4+

outputPresentationCommands

TypeScript
outputPresentationCommands(time: _CoreMedia_CMTime): (Array<PresentationCommand>) | null
Swift declaration
func outputPresentationCommands(for time: CMTime) -> [PresentationCommand]?

This function returns all presentation commands to be muxed into an MOV during an `AVAssetWriter` session. Don't use this function for playback rendering. - Parameters: - time: PTS time to query for commands - including: array of command types to include, defaults to all commands - Returns: An array of PresentationCommand instances representing the commands that need to be included in the output file for that PTS.

method · iOS 26.4+

processPresentationCommands

TypeScript
processPresentationCommands(presentationTimeStamp: _CoreMedia_CMTime): void
Swift declaration
func processPresentationCommands(for presentationTimeStamp: CMTime)

Processes the commands and updates the publishers exported by this reader when called by the application (e.g. render/playback loop) - Parameter presentationTimeStamp: The current presentation time to query metadata.

get · iOS 26.4+

isSideloaded

TypeScript
get isSideloaded(): boolean
Swift declaration
var isSideloaded: Bool { get }

A Boolean value that indicates whether the reader input is sideloaded or is it set during playback.

method · iOS 27.0+

metadataItem

TypeScript
metadataItem(frameTimeRange: _CoreMedia_CMTimeRange): (_AVFoundation_AVMetadataItem) | null
Swift declaration
func metadataItem(frameTimeRange: CMTimeRange) throws -> AVMetadataItem?

Builds a metadata item containing the presentation commands active at the start of the specified frame's time range. This is intended to be called once per video frame. The returned item's `time` and `duration` are set directly from `frameTimeRange`, so the caller can write it into a per-frame metadata track without further clipping or stamping. Returns `nil` if no presentation commands are active at `frameTimeRange.start`. - Parameter frameTimeRange: The frame's presentation time range. Its `start` is used to resolve which commands are active; the returned item is stamped with the full range. - Returns: An `AVMetadataItem` whose value encodes the active presentation commands for that frame, or `nil` if none are active.

get · iOS 27.0+

isShotFlipped

TypeScript
get isShotFlipped(): boolean
Swift declaration
var isShotFlipped: Bool { get }

A Boolean value that indicates whether to vertically flip the video frame for the PTS specified in the last call to the update method.

get · iOS 26.4+

isShotFlopped

TypeScript
get isShotFlopped(): boolean
Swift declaration
var isShotFlopped: Bool { get }

A Boolean value that indicates whether to horizontally flip the video frame for the PTS specified in the last call to the update method.

method · iOS 27.0+

metadataTrack

TypeScript
metadataTrack(timeRange?: (_CoreMedia_CMTimeRange) | null): Array<_AVFoundation_AVMetadataItem>
Swift declaration
func metadataTrack(timeRange: CMTimeRange? = nil) throws -> [AVMetadataItem]

Retrieves all metadata items to write to an output metadata track, optionally clipped to a segment time range. Pass a `timeRange` to produce one item per segment (e.g. per IDR group or per fixed-length interval). Note: the last item's `duration` may be invalid, since the descriptor itself doesn't know where the video ends. If you need a concrete duration (e.g. to extend the final segment to the end of the video), copy the returned item and overwrite `duration` with the valid value. Also, use the same timescale for `timeRange` as the ``PresentationCommand`` values to avoid timescale mismatches. - Parameter timeRange: The segment range to filter to, or `nil` to return all items. - Returns: An array of `AVMetadataItem` objects sorted by start time.

get · iOS 27.0+

cameraOverrides

TypeScript
get cameraOverrides(): (SetCameraCommand_Overrides) | null
Swift declaration
var cameraOverrides: SetCameraCommand.Overrides? { get }

The current camera params which would override static metadata to use when rendering playback for the PTS specified in the last call to the update method.

get · iOS 26.4+

colorFadeOpacity

TypeScript
get colorFadeOpacity(): number
Swift declaration
var colorFadeOpacity: Float { get }

The current color fade opacity of the video frames during playback for the PTS specified in the last call to the update method.

get · iOS 26.4+

presentationCommands

TypeScript
get presentationCommands(): Array<PresentationCommand>
Swift declaration
var presentationCommands: [PresentationCommand] { get }

The active presentation commands for the PTS specified in the last call to the update method.

get · iOS 26.4+

environmentFadeOpacity

TypeScript
get environmentFadeOpacity(): number
Swift declaration
var environmentFadeOpacity: Float { get }

The current opacity of the environment backdrops during playback for the PTS specified in the last call to the update method.

get · iOS 26.4+

cameraID

TypeScript
get cameraID(): (string) | null
Swift declaration
var cameraID: String? { get }

The current camera ID string of the immersive camera to use when rendering playback for the PTS specified in the last call to the update method.

get · iOS 26.4+

colorFade

TypeScript
get colorFade(): SDKHandle
Swift declaration
var colorFade: simd_float3 { get }

The current fade color for color fading of the video frames during playback for the PTS specified in the last call to the update method.

Skipped declarations

No declarations were skipped in this snapshot.

All ImmersiveMediaSupport types →