<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImmersiveMediaSupport",
  "identifier" : "/documentation/ImmersiveMediaSupport/PresentationDescriptor/init(duration:commands:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Immersive Media Support"
    ],
    "preciseIdentifier" : "s:21ImmersiveMediaSupport22PresentationDescriptorV8duration8commandsACSo6CMTimeaSg_SayAA0D7CommandOGtcfc"
  },
  "title" : "init(duration:commands:)"
}
-->

# init(duration:commands:)

Creates an instance that contains the commands specified in the array:

```
init(duration: CMTime? = nil, commands: [PresentationCommand] = [])
```

## Parameters

`duration`

The duration of the metadata commands.

`commands`

An array of presentation commands.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)