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`.
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.