One Logo Pool Ball
ImmersiveMediaSupport · IOS API REFERENCE

FadeCommand

struct · iOS 26.4+ · SDK 27.1

struct FadeCommand

A command type for color fading during immersive media playback. You use a color fade to either fade into the video frame from a requested color, or fade out of the video frame to a requested color. The fade commands are usually used for fading in at the start of the playback and fading out at the end of the playback. These commands are also used during immersive camera view switches during the playback. Fade commands can be absolute time-based or offset-based. If absolute time-based, then `time` dictates the time it needs to start executing and keep fading until the `duration` property value. On the other hand if they are offset based, then the `offset` dictates the fade percentage from the start `time` of the fade command until the `duration` of the fade. If the fade has to start at time `0.0` second of the playback for duration of `1.0` seconds and if the media FPS is `90`, then first frame is accompanied with presentation metadata that has fade command with `0.011` as offset, the second frame has fade command with offset of `0.022`, and so on; the 90th frame has an offset of `1.0`.

Members (12)

init · iOS 26.4+

init

TypeScript
static init(id: number, time: _CoreMedia_CMTime, duration: _CoreMedia_CMTime, direction: FadeCommand_FadeDirection, color: SDKHandle, offset?: (_CoreMedia_CMTime) | null): FadeCommand
Swift declaration
init(id: Int, time: CMTime, duration: CMTime, direction: FadeCommand.FadeDirection, color: simd_float3, offset: CMTime? = nil)

Initializes a color fade command. - Parameters: - id: The unique ID of this command. - time: The time this command starts during playback. - duration: The duration of the command. This can be `.zero` if the command has no duration. - direction: The fade direction for this command instance. - color: The fade color. - offset: The offset from the start time of this command. This parameter is usually unused and let in control of a `PresentationDescriptorReader`.

get · iOS 26.4+

id

TypeScript
get id(): number
Swift declaration
var id: Int { get }

A unique command ID for the entire immersive media file.

get · iOS 26.4+

time

TypeScript
get time(): _CoreMedia_CMTime
Swift declaration
var time: CMTime

The time this command starts during playback.

set · iOS 26.4+

time

TypeScript
set time(value: _CoreMedia_CMTime)
Swift declaration
var time: CMTime

The time this command starts during playback.

get · iOS 26.4+

color

TypeScript
get color(): SDKHandle
Swift declaration
var color: simd_float3

The fade color value ranging from `0.0` to `1.0` for each color channel representing RGB color space. If the color is set to black, and the direction is `in`, then it fades from black to the video frame.

set · iOS 26.4+

color

TypeScript
set color(value: SDKHandle)
Swift declaration
var color: simd_float3

The fade color value ranging from `0.0` to `1.0` for each color channel representing RGB color space. If the color is set to black, and the direction is `in`, then it fades from black to the video frame.

get · iOS 26.4+

offset

TypeScript
get offset(): (_CoreMedia_CMTime) | null
Swift declaration
var offset: CMTime?

The offset from the start time of this command.

set · iOS 26.4+

offset

TypeScript
set offset(value: (_CoreMedia_CMTime) | null)
Swift declaration
var offset: CMTime?

The offset from the start time of this command.

get · iOS 26.4+

duration

TypeScript
get duration(): _CoreMedia_CMTime
Swift declaration
var duration: CMTime

The duration of the command.

set · iOS 26.4+

duration

TypeScript
set duration(value: _CoreMedia_CMTime)
Swift declaration
var duration: CMTime

The duration of the command.

get · iOS 26.4+

direction

TypeScript
get direction(): FadeCommand_FadeDirection
Swift declaration
var direction: FadeCommand.FadeDirection

Fade direction for this command instance.

set · iOS 26.4+

direction

TypeScript
set direction(value: FadeCommand_FadeDirection)
Swift declaration
var direction: FadeCommand.FadeDirection

Fade direction for this command instance.

Skipped declarations

No declarations were skipped in this snapshot.

All ImmersiveMediaSupport types →