Capítulo 40 de 411

Chapter 40: Timeline.addPause()

Core Idea

addPause() inserts a special callback that pauses the timeline's playback when the playhead reaches a given time/label.

Reference Tables

ParameterTypeDefaultDescription
positionString | Number | Label"+=0"where the pause fires
callbackFunctionnulloptional function called right after pausing
paramsArraynullarguments for the callback

Returns: self.

Code Examples

tl.addPause("myLabel", () => console.log("paused"));

Key Takeaways

  1. Useful for step-by-step scripted sequences (e.g. a guided tour) where playback should stop and wait for a user action before resuming.

Connects To

  • Timeline.play() / resume(): how playback continues after an addPause() stop.