Package com.castlabs.android.player
Class Chapter
java.lang.Object
com.castlabs.android.player.Chapter
Basic chapter model that consists of the chapter position, a title, and an image
URL. Both, the title and the image URL are optional.
- Since:
- 2.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanbooleanisShown(long positionMs) voidsetEndPositionMs(long endPositionMs) voidsetHighlighted(boolean highlighted)
-
Field Details
-
positionMs
public final long positionMsThe chapter position in milliseconds -
title
(Optional) title -
imageUrl
(Optional) URI to an image
-
-
Constructor Details
-
Chapter
public Chapter(long position) Create a new chapter- Parameters:
position- the chapter position
-
Chapter
Create a new chapter- Parameters:
position- the chapter position in millisecondstitle- the chapter title
-
Chapter
Create a new chapter- Parameters:
positionMs- the position of the chapter start in mstitle- the title (optional)imageUrl- the image url (optional)
-
Chapter
Create a new chapter- Parameters:
positionMs- the position of the chapter start in msendPositionMs- the end position in ms or -1title- the title (optional)imageUrl- the image url (optional)
-
-
Method Details
-
getEndPositionMs
public long getEndPositionMs() -
setEndPositionMs
public void setEndPositionMs(long endPositionMs) -
isHighlighted
public boolean isHighlighted() -
setHighlighted
public void setHighlighted(boolean highlighted) -
isShown
public boolean isShown(long positionMs)
-