<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVSynchronizedLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVSynchronizedLayer"
  },
  "title" : "AVSynchronizedLayer"
}
-->

# AVSynchronizedLayer

A Core Animation layer that derives its timing from a player item so that you can synchronize layer animations with media playback.

```
class AVSynchronizedLayer
```

## Overview

You can create an arbitrary number of synchronized layers from the same `AVPlayerItem` object.

A synchronized layer is similar to a <doc://com.apple.documentation/documentation/QuartzCore/CATransformLayer> object in that it doesn’t display anything itself, it just confers state upon its layer subtree. `AVSynchronizedLayer` confers its timing state, synchronizing the timing of layers in its subtree with that of a player item.

Any `CoreAnimation` layer with animation property set that is added as a sublayer of `AVSynchronizedLayer` should set the animation’s <doc://com.apple.documentation/documentation/QuartzCore/CAMediaTiming/beginTime> property to a non-zero positive value so animations will be interpreted on the player item’s timeline. `CoreAnimation` replaces the default `beginTime` of 0.0 with <doc://com.apple.documentation/documentation/QuartzCore/CACurrentMediaTime()>. To start the animation from time 0, use a small positive value like [`AVCoreAnimationBeginTimeAtZero`](/documentation/AVFoundation/AVCoreAnimationBeginTimeAtZero).

You might use a layer as shown in the following example:

```objc
AVPlayerItem *playerItem = <#Get a player item#>;
CALayer *superLayer =  <#Get a layer#>;
// Set up a synchronized layer to sync the layer timing of its subtree
// with the playback of the playerItem/
AVSynchronizedLayer *syncLayer = [AVSynchronizedLayer synchronizedLayerWithPlayerItem:playerItem];
[syncLayer addSublayer:<#Another layer#>];    // These sublayers will be synchronized.
[superLayer addSublayer:syncLayer];
```

## Topics

### Creating a synchronized layer

[`init(playerItem:)`](/documentation/AVFoundation/AVSynchronizedLayer/init(playerItem:))

Creates a new synchronized layer with timing synchronized with a given player item.

### Managing the player item

[`playerItem`](/documentation/AVFoundation/AVSynchronizedLayer/playerItem)

The player item to which the timing of the layer is synchronized.

### Supporting types

[`AVCoreAnimationBeginTimeAtZero`](/documentation/AVFoundation/AVCoreAnimationBeginTimeAtZero)

A value that sets an animation begin time to `0`.



---

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)