Package com.castlabs.android.player
Class Chapter
- java.lang.Object
-
- com.castlabs.android.player.Chapter
-
public class Chapter extends Object
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 Modifier and Type Field Description Uri
imageUrl
(Optional) URI to an imagelong
positionMs
The chapter position in millisecondsString
title
(Optional) title
-
Constructor Summary
Constructors Constructor Description Chapter(long position)
Create a new chapterChapter(long positionMs, long endPositionMs, String title, Uri imageUrl)
Create a new chapterChapter(long position, String title)
Create a new chapterChapter(long positionMs, String title, Uri imageUrl)
Create a new chapter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getEndPositionMs()
boolean
isHighlighted()
boolean
isShown(long positionMs)
void
setEndPositionMs(long endPositionMs)
void
setHighlighted(boolean highlighted)
-
-
-
Constructor Detail
-
Chapter
public Chapter(long position)
Create a new chapter- Parameters:
position
- the chapter position
-
Chapter
public Chapter(long position, String title)
Create a new chapter- Parameters:
position
- the chapter position in millisecondstitle
- the chapter title
-
Chapter
public Chapter(long positionMs, String title, Uri imageUrl)
Create a new chapter- Parameters:
positionMs
- the position of the chapter start in mstitle
- the title (optional)imageUrl
- the image url (optional)
-
-