Instance Method

nextTimedMetadataGroup()

Returns the next timed metadata group for the asset reader output.

Declaration

func nextTimedMetadataGroup() -> AVTimedMetadataGroup?

Return Value

An instance of AVTimedMetadataGroup, representing the next logical segment of metadata from the source asset reader output.

Discussion

This method will return nil after reading all timed metadata groups from the asset reader output, or if there is an error that prevents reading more timed metadata groups. When this method returns nil, clients should check the value of the associated AVAssetReader instance’s status property to determine why no more samples could be read.

Before calling this method, you must ensure that the output which underlies the receiver is attached to an AVAssetReader via a prior call to add(_:) and that startReading() has been called on the asset reader.