How to measure start time
Asked on 08/04/2024
1 search
To measure the start time of media playback in AVFoundation, you can use the "likely to keep up" event on the timeline. This event indicates when the AV player has buffered enough to resume playback. By examining this event, you can determine the startup time and identify factors that affected it, such as playlist fetching, media segment fetching, and content key requests.
For more detailed insights, you can refer to the session Discover media performance metrics in AVFoundation (02:11).
Relevant Sessions

Render Metal with passthrough in visionOS
Get ready to extend your Metal experiences for visionOS. Learn best practices for integrating your rendered content with people’s physical environments with passthrough. Find out how to position rendered content to match the physical world, reduce latency with trackable anchor prediction, and more.

Explore Swift performance
Discover how Swift balances abstraction and performance. Learn what elements of performance to consider and how the Swift optimizer affects them. Explore the different features of Swift and how they’re implemented to further understand the tradeoffs available that can impact performance.

Discover media performance metrics in AVFoundation
Discover how you can monitor, analyze, and improve user experience with the new media performance APIs. Explore how to monitor AVPlayer performance for HLS assets using different AVMetricEvents, and learn how to use these metrics to understand and triage player performance issues.