ActiveListAutoPlay
TYPE DEFINITION
AutoPlay means that the ActiveList will move to the next content by itself after a duration.
Contains whether or not the autoPlay is playing via isPlaying and the current duration via duration.
Since 1.0.0
Properties
-
duration
number
The amount of milliseconds the item should remain active before jumping to the next item.
This duration is the duration for the current item which is playing. It is not affected by calling pause, meaning that when the duration is set to 200ms and you pause after 100ms, the duration will still be 200ms.
When calling stop, or when stop is called when the autoPlay reaches the end, the duration will be set to zero.
Since 1.0.0
-
hasBeenStoppedBefore
boolean
Whether or not the ActiveList had the autoPlay stopped at one point before.
Use case: say you are making a carousel which should stop on any user interaction, so you set stopsOnUserInteraction to true. Say you also have another feature: a pause whenever the user hovers over the carousel. These two features would cause a conflict:
Whenever the mouse over happens you call play(), which negates the stopsOnUserInteraction, causing the carousel to play again.
To fix this problem you should on the mouse over not call play() whenever hasBeenStoppedBefore is true.
Since 1.1.0
-
isPlaying
boolean
Whether or not the ActiveList is playing. In other words whether or not the ActiveList is going to cycle through the content automatically.
Since 1.0.0