Contents

progress(forTrack:)

Returns the progress for a specific track identified by its assemblyTrackID.

Declaration

func progress(forTrack assemblyTrackID: CMPersistentTrackID) -> Float

Parameters

  • assemblyTrackID:

    The track ID to query progress for.

Return Value

A float value between 0.0 and 1.0 representing the percentage of duration completed for the track. Returns 0.0 if the track ID is not found.

Discussion

The progress is calculated as the ratio of completed duration to total duration for the track.

See Also

Getting progress