AutoPlay
Plugin that allows you to automatically move to the next/previous panel on a specific time basis
See Also:
Constructor
constructor(options?: Partial<AutoPlayOptions>);
Constructs a new instance of the AutoPlay class
Parameters
options (Partial<AutoPlayOptions>) - Options for the AutoPlay instance
Examples
flicking.addPlugins(new AutoPlay({ duration: 2000, direction: "NEXT" }));
Options
animationDuration
Type: number | undefined
Duration of the panel move animation (ms). If undefined, the Flicking instance's duration is used
Default: undefined
delayAfterHover
Type: number
If stopOnHover is true, time to wait before resuming after mouse leaves (ms)
Default: Same as duration``
direction
Type: (typeof DIRECTION)["NEXT"] | (typeof DIRECTION)["PREV"]
The direction in which the panel moves
Default: "NEXT"
Properties
play
Type: () => void
Start the autoplay timer. Panels will move automatically after the configured duration.
Methods
init
init(flicking: Flicking): void
Initialize the plugin and start autoplay on the given Flicking instance.
Parameters:
flicking(Flicking) - The Flicking instance to attach this plugin to