<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AudioPlaybackGroupController/play(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation28AudioPlaybackGroupControllerC4play2atySo11AVAudioTimeC_tKF"
  },
  "title" : "play(at:)"
}
-->

# play(at:)

Plays all audio resources in the group asynchronously at a specified time.

```
@MainActor @preconcurrency func play(at time: AVAudioTime) throws
```

## Parameters

`time`

The `AVAudioTime` at which the group should start playing.

## Discussion

Use this method to schedule playback of the group to a precise time in the future.
This method enables sample-accurate timing for the group and synchronization with
other audio sources.

Any call to [`play()`](/documentation/RealityKit/AudioPlaybackGroupController/play()) cancels a pending scheduled time
and plays audio immediately. Any call to [`play(at:)`](/documentation/RealityKit/AudioPlaybackGroupController/play(at:))
cancels a pending scheduled time and reschedules to the new time. The controller
ignores calls to [`play()`](/documentation/RealityKit/AudioPlaybackGroupController/play()) when audio is already playing.

Audio preparation must complete before the scheduled playback time to maintain precise
timing. If preparation is still in progress when the scheduled time arrives, or if the
scheduled time is in the past, playback starts immediately, which may result in timing
drift. For accurate synchronization, schedule a time sufficiently far in the future.

The [`isPlaying`](/documentation/RealityKit/AudioPlaybackGroupController/isPlaying) property becomes `true` immediately
after this call returns. Code that checks `isPlaying` to decide whether to trigger
another action reads the correct state without racing against the scheduled start time.

To synchronize this group with other audio sources, use the same base time for all
scheduled playback calls.

> Throws: An error if the controller fails to schedule playback.

---

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)