---
title: sourceClock
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avplayer/sourceclock
---

# sourceClock

A clock the player uses for item time bases.

## Declaration

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

## Discussion

Discussion The default value is nil. Setting an explicit source clock is useful to synchronize video-only movies with audio that plays through a different audio device. important: Specifying a source clock for a device other than the one playing audio may cause audio to 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)
- [masterClock](avfoundation/avplayer/masterclock.md)
