Class FilterFormat
java.lang.Object
com.castlabs.android.player.filter.FilterFormat
Wrapper class around a Format, as well as any information that may be required to filter it.
- Since:
- 4.2.26
-
Constructor Summary
ConstructorsConstructorDescriptionFilterFormat(com.google.android.exoplayer2.Format format, int mediaType, com.google.android.exoplayer2.Format[] groupFormats, boolean isAd) Represents a filter format for media content. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the filter reason, or 0 in case the track is unfiltered.com.google.android.exoplayer2.FormatReturns the format of this track.com.google.android.exoplayer2.Format[]Returns the formats for all tracks in the same group.intReturns the media type of this track.booleanisAd()Returns whether this track belongs to an Ad Period.booleanReturns whether this track has been marked as filtered.voidkeep()Marks this track to be kept by clearing the filter reason.voidremove()Mark this track as to be removed with reasonSdkConsts.FILTER_REASON_CUSTOM.voidremove(int filterReason) Marks this track to be removed with the provided reason
-
Constructor Details
-
FilterFormat
public FilterFormat(@NonNull com.google.android.exoplayer2.Format format, int mediaType, @NonNull com.google.android.exoplayer2.Format[] groupFormats, boolean isAd) Represents a filter format for media content.- Parameters:
format- the format of this trackmediaType- the media type of this track, seeSdkConsts.MediaTypegroupFormats- the formats for all tracks in the same groupisAd- whether this track belongs toan Ad Period
-
-
Method Details
-
getFormat
@NonNull public com.google.android.exoplayer2.Format getFormat()Returns the format of this track.- Returns:
- the format of this track
-
getGroupFormats
@NonNull public com.google.android.exoplayer2.Format[] getGroupFormats()Returns the formats for all tracks in the same group.- Returns:
- the formats for all tracks in the same group
-
remove
public void remove()Mark this track as to be removed with reasonSdkConsts.FILTER_REASON_CUSTOM. -
remove
public void remove(int filterReason) Marks this track to be removed with the provided reason- Parameters:
filterReason- the reason for this removal
-
keep
public void keep()Marks this track to be kept by clearing the filter reason. -
getMediaType
public int getMediaType()Returns the media type of this track.- Returns:
- the media type of this track
-
isAd
public boolean isAd()Returns whether this track belongs to an Ad Period.- Returns:
- whether this track belongs to an Ad Period
-
isFiltered
public boolean isFiltered()Returns whether this track has been marked as filtered.- Returns:
- whether this track has been marked as filtered
-
getFilterReason
public int getFilterReason()Returns the filter reason, or 0 in case the track is unfiltered.- Returns:
- the filter reason, or 0 in case the track is unfiltered
-