Synchronizes the playback rate and time of the current item with an external source.
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The playback rate for the item.
The precise time at which to match playback of the item. To use the current item’s current time, specify
The host time at which to synchronize playback. If you specify
invalid, the rate and time are set together without any external synchronization.
This method adjusts the current item’s timebase so that the time in
item is in sync with the time in
host. Thus, if
host specifies a time in the past, the item’s timebase is adjusted to make it appear as if the item has been running at the specified rate since
item. And if
host specifies a time in the future, playback is adjusted backward (if possible) so that the value in
item occurs at the precise moment the host’s clock reaches the value in
host. If there is no content to play before the time specified by
item, playback holds until the two times come into sync.
This method does not ensure that media data is loaded before the timebase starts moving. However, if you specify a host time in the near future, that would give you some time to load the media data and prepare for playback.