getCurrentClipPlaybackProgress
Introduction
The getCurrentClipPlaybackProgress()
method retrieves the current playback progress of the active key play clip as a value between 0 and 1. A value of 0 indicates that the clip has just started playing, while a value of 1 indicates that the clip has fully played. If no clip is currently active, the method returns nil
.
Return Value
Return Type | Description | Example |
---|---|---|
Double? | The current playback progress of the clip, represented as a value between 0 (start) and 1 (end), or nil if no clip is playing. | 0.75 |
Code Example
if let progress = eventInterface.getCurrentClipPlaybackProgress() {
print("Current playback progress: \(progress)")
} else {
print("No clip is currently playing.")
}