Timeline
Introduction
Function signature
timeline = Timeline(
frames_count=31,
intervals=[[0, 6], [6, 11], [12, 15], [16, 17], [18, 19], [20, 31]],
colors=["#DB7093", "#93db70", "#7093db", "#70dbb8", "#db8370", "#db70c9"],
height="30px",
)Parameters
Parameters
Type
Description
frames_count
intervals
colors
height
pointer_color
tooltip_content
widget_id
Mini App Example
Import libraries
Write a function for dividing the total number of frames by ranges
Write function generating random hex colors for each range
Init API client
Initialize Video ID we will use
Video ID we will useGet video info from server and prepare VideoThumbnail widget
Get video intervals and colors from video frame count
Initialize Timeline widget
Create InputNumber widget for setting current frame
Create Timeline container
Create app layout
Create app using layout
Add callbacks for changing the current frame
Last updated