Class SideloadedTrack
java.lang.Object
com.castlabs.android.player.models.SideloadedTrack
- All Implemented Interfaces:
Parcelable
Represents a track which is side-loaded (not declared in the content manifest).
In order to add a SideloadedTrack
, use the SdkConsts.INTENT_SIDELOADED_TRACKS_ARRAYLIST
providing an ArrayList
with the tracks to add. You can also
A SideloadedTrack
can represent either a Subtitle or a Thumbnail track. You should use
the corresponding Builder
depending on which type of SideloadedTrack
is to be created.
For a subtitle track use the SideloadedTrack.SubtitleBuilder
, and SideloadedTrack.ThumbnailBuilder
for a thumbnail track.
- Since:
- 4.2.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
SideloadedTrack.Builder<T extends SideloadedTrack.Builder<T>>
Base Builder classstatic final class
Convenience Builder to create aSideloadedTrack
with the type set toSideloadedTrack.Type.SUBTITLE
static final class
Convenience Builder to create aSideloadedTrack
with the type set toSideloadedTrack.Type.THUMBNAIL
static enum
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator
<SideloadedTrack> final long
The grid height as number of thumbnails per column.final long
The grid width as number of thumbnails per row.final long
The interval per-thumbnail for THUMBNAILS tracks.final String
The kind attribute for text tracksfinal String
The label for text tracksfinal String
Two latter language code for text tracksfinal String
The MIME type of the track.final int
Thumbnail format.final SideloadedTrack.Type
Track type, can be eitherSideloadedTrack.Type.SUBTITLE
orSideloadedTrack.Type.THUMBNAIL
final String
The URL or URL template for this track.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionSideloadedTrack
(SideloadedTrack.Type trackType, String url, String mimeType, long intervalMs, long gridWidth, long gridHeight, int thumbnailFormat, String language, String label, String kind) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
void
writeToParcel
(Parcel dest, int flags)
-
Field Details
-
CREATOR
-
trackType
Track type, can be eitherSideloadedTrack.Type.SUBTITLE
orSideloadedTrack.Type.THUMBNAIL
-
url
The URL or URL template for this track. -
mimeType
The MIME type of the track. -
intervalMs
public final long intervalMsThe interval per-thumbnail for THUMBNAILS tracks. This is optional and not required for subtitle tracks or thumbnail tracks that come with an index such as BIF or WebVTT. -
gridWidth
public final long gridWidthThe grid width as number of thumbnails per row. This is optional and not required for subtitle tracks or thumbnail tracks that come with an index such as BIF or WebVTT. -
gridHeight
public final long gridHeightThe grid height as number of thumbnails per column. This is optional and not required for subtitle tracks or thumbnail tracks that come with an index such as BIF or WebVTT. -
language
Two latter language code for text tracks -
label
The label for text tracks -
kind
The kind attribute for text tracks -
thumbnailFormat
public final int thumbnailFormatThumbnail format. One ofThumbnailDataTrack.ThumbnailFormat
-
-
Constructor Details
-
SideloadedTrack
public SideloadedTrack(@NonNull SideloadedTrack.Type trackType, @NonNull String url, @Nullable String mimeType, long intervalMs, long gridWidth, long gridHeight, int thumbnailFormat, @Nullable String language, @Nullable String label, @Nullable String kind) - Parameters:
trackType
- track typeurl
- track urlmimeType
- mime typeintervalMs
- The interval per-thumbnail for THUMBNAILS tracks.gridWidth
- The grid width as number of thumbnails per row.gridHeight
- The grid height as number of thumbnails per column.thumbnailFormat
- The thumbnail type for THUMBNAIL tracks.language
- Two latter language code for text trackslabel
- The label for text trackskind
- The kind attribute for text tracks
-
-
Method Details
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
-
hashCode
public int hashCode() -
equals
-