Last Updated on : 2024-03-04 08:53:15
The timeline view component linearly displays the time points of SD card-stored or cloud-stored video footage to be played back. Users can slide the timeline and precisely locate the target time point and video clip to start playback.
dependencies {
implementation 'com.thingclips.smart:thingsmart-ipc-camera-timeline:1.1.0'
}
Classes
Class name | Description |
---|---|
ThingTimelineView | Timeline controls |
OnBarMoveListener | Callbacks for sliding timeline |
OnSelectedTimeListener | The callback that is executed when a time range is selected with a selection frame on the timeline |
Custom properties
Name | Description |
---|---|
topTextMargin | The top spacing of text. |
bottomTextMargin | The bottom spacing of text. |
smallRulerHeight | The height of short scales. |
timeScaleColor | The color of the time text. |
linesColor | The color of tick marks. |
bubbleColor | The background color of bubbles. |
bubbleTextColor | The color of bubble text. |
void setContentShader(Shader contentShader)
void setTimeZone(TimeZone zone)
Specifies whether to display the current time with bubble text when users slide the timeline or select a mode.
void setShowBubbleWhenDrag(boolean show)
Sets the width of a time unit. Unit: px.
void setSpacePerUnit(int spacePerUnit)
API description
The time unit. The value can be set to 60 seconds, 600 seconds, or 3,600 seconds.
void setUnitMode(TimelineUnitMode mode)
Parameters
Enum value | Description |
---|---|
TimelineUnitMode.Mode_60 | Each time unit is 60 seconds. |
TimelineUnitMode.Mode_600 | Each time unit is 600 seconds. |
TimelineUnitMode.Mode_3600 | Each time unit is 3,600 seconds. |
void setShowTimeText(boolean showTimeText)
void setShowShortMark(boolean showShortMark)
void showSelectTimeArea(boolean open)
The minimum and maximum durations that can be selected with the selection frame. Unit: seconds.
void setSelectTimeAreaRange(long min, long max)
void setSelectionBoxColor(int color)
void setSelectCenterColor(int selectCenterColor)
boolean isSelectionEnabled()
void setCurrentTimeConfig(long currentTimeInMillisecond)
Sets the current time. Unit: milliseconds.
void setCurrentTimeInMillisecond(long currentTimeInMillisecond)
Displays bubble text in the 12-hour clock format.
void setTimeAmPmString(String timeAmString, String timePmString)
void setRecordDataExistTimeClipsList(List<TimeBean> source)
public void setCanQueryData()
public synchronized void setQueryNewVideoData(boolean var1);
API description
public void setStyle(int style);
Parameters
Value | Description |
---|---|
1 | Timescale values appear above the timeline and short scales are visible. This is the default style. |
2 | Timescale values appear below the timeline and short scales are invisible. |
For Style 2, bubble text appears above the timeline. In this case, set the parent layout of the timeline to android:clipChildren="false"
to avoid display exceptions.
public void setMiddleCursorColor(int color)
void onBarActionDown()
API description
void onBarMove(long screenLeftTime, long screenRightTime, long currentTime)
Parameters
Parameter | Description |
---|---|
screenLeftTime | The leftmost time on the screen. |
screenRightTime | The rightmost time on the screen. |
currentTime | The current time. |
API description
Automatically locates the clips available for playback after sliding to the current position.
void onBarMoveFinish(long startTime, long endTime, long currentTime)
Parameters
Parameter | Description |
---|---|
startTime | The start time of the clips available for playback. -1 is returned if no clips are found. |
endTime | The end time of the clips available for playback. -1 is returned if no clips are found. |
currentTime | The time when sliding is stopped. -1 is returned if no clips are found. |
API description
void onDragging(long selectStartTime, long selectEndTime)
Parameters
Parameter | Description |
---|---|
selectStartTime | The leftmost time of the selection frame. |
selectEndTime | The rightmost time of the selection frame. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback