A command type for opacity fading environment backdrops during immersive media playback.
Use opacity fade to apply the requested opacity to the AIV environment backdrops. Fade environment commands can be absolute time-based or offset-based.
If fade environment commands are absolute time-based, `time` dictates the time it needs to start executing and keep fading until the `duration` property value.
If the fade environment commands are offset-based, then `offset` property dictates the fade percentage from the start `time` of the fade environment command until the `duration` of the fade.
For example, if the fade starts at `0.0` of the playback for a duration of `1.0` seconds and if the media FPS is 90, then first frame
is accompanied with presentation metadata with the fade environment command, which has an offset of `0.011`. The second frame has a fade
environment command with offset of `0.022` seconds, and so on, giving 90th frame an offset of `1.0`.
Creates a fade environment command instance.
- 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 doesn't have a specific duration.
- direction: The fade direction for this command instance.
- opacity: The fade opacity.
- offset: The offset from the start time of this command.
get · iOS 26.4+
id
TypeScript
get id(): number
Swift declaration
var id: Int { get }
A unique command ID for the 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+
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+
opacity
TypeScript
get opacity(): number
Swift declaration
var opacity: Float
The fade opacity value between `0.0` to `1.0`.
This value represents the target opacity of the environment backdrops during playback after fading completes.
set · iOS 26.4+
opacity
TypeScript
set opacity(value: number)
Swift declaration
var opacity: Float
The fade opacity value between `0.0` to `1.0`.
This value represents the target opacity of the environment backdrops during playback after fading completes.
get · iOS 26.4+
duration
TypeScript
get duration(): _CoreMedia_CMTime
Swift declaration
var duration: CMTime
The duration of the command - this can be .zero if the command has no duration
set · iOS 26.4+
duration
TypeScript
set duration(value: _CoreMedia_CMTime)
Swift declaration
var duration: CMTime
The duration of the command - this can be .zero if the command has no duration
get · iOS 26.4+
direction
TypeScript
get direction(): FadeEnvironmentCommand_FadeDirection
Swift declaration
var direction: FadeEnvironmentCommand.FadeDirection
Fade direction for this command instance.
set · iOS 26.4+
direction
TypeScript
set direction(value: FadeEnvironmentCommand_FadeDirection)
Swift declaration
var direction: FadeEnvironmentCommand.FadeDirection