One Logo Pool Ball
ImmersiveMediaSupport · IOS API REFERENCE

FadeEnvironmentCommand

struct · iOS 26.4+ · SDK 27.1

struct FadeEnvironmentCommand

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

Members (12)

init · iOS 26.4+

init

TypeScript
static init(id: number, time: _CoreMedia_CMTime, duration: _CoreMedia_CMTime, direction: FadeEnvironmentCommand_FadeDirection, opacity: number, offset?: (_CoreMedia_CMTime) | null): FadeEnvironmentCommand
Swift declaration
init(id: Int, time: CMTime, duration: CMTime, direction: FadeEnvironmentCommand.FadeDirection, opacity: Float, offset: CMTime? = nil)

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

Fade direction for this command instance.

Skipped declarations

No declarations were skipped in this snapshot.

All ImmersiveMediaSupport types →