fetchAccessLog(completionHandler:)
Asynchronously retrieves the access log without blocking the calling thread.
Declaration
nonisolated func fetchAccessLog(completionHandler: @escaping @Sendable (sending AVPlayerItemAccessLog?) -> Void)nonisolated var accessLog: AVPlayerItemAccessLog? { get async }Parameters
- completionHandler:
A block that is called with the access log. May be called with nil if no logging information is available.
Discussion
An AVPlayerItemAccessLog provides methods to retrieve the network access log in a format suitable for serialization. If nil is returned then there is no logging information currently available for this AVPlayerItem. An AVPlayerItemNewAccessLogEntryNotification will be posted when new logging information becomes available. However, accessLog might already return a non-nil value even before the first notification is posted.