---
title: masterClock
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplayer/masterclock
---

# masterClock

The host clock for item time bases.

## Declaration

```swift
nonisolated var masterClock: CMClock? { get set }
```

## Discussion

Discussion The default value of this property is NULL, which means that the host clock is the automatic choice. When non-NULL, this property overrides the automatic choice of host clock for item time bases. This is most useful when you’re synchronizing video-only movies with audio from another source. important: If you specify a host clock other than the appropriate audio device’s clock, the audio may drift out of sync.

## See Also

### Synchronizing multiple players

- [setRate(_:time:atHostTime:)](avfoundation/avplayer/setrate(_:time:athosttime:).md)
- [preroll(atRate:completionHandler:)](avfoundation/avplayer/preroll(atrate:completionhandler:).md)
- [cancelPendingPrerolls()](avfoundation/avplayer/cancelpendingprerolls().md)
- [sourceClock](avfoundation/avplayer/sourceclock.md)
