Package com.castlabs.android.player
Class MetadataConfiguration.Builder
java.lang.Object
com.castlabs.android.player.MetadataConfiguration.Builder
- Enclosing class:
MetadataConfiguration
MetadataConfiguration builder static inner class.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Constructs a newBuilderwith defaults.Builder(MetadataConfiguration copy) Constructs a newBuilderby copying the values from an existingMetadataConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionendOfStreamMetadataThresholdUs(long endOfStreamMetadataThresholdUs) Sets the end-of-stream metadata threshold, in microseconds.get()Returns aMetadataConfigurationbuilt from the parameters previously set.outputMetadataEarly(boolean outputMetadataEarly) Sets whether metadata is output immediately after it is decoded instead of at its presentation time.
-
Constructor Details
-
Builder
public Builder()Constructs a newBuilderwith defaults. -
Builder
Constructs a newBuilderby copying the values from an existingMetadataConfiguration.- Parameters:
copy- TheMetadataConfigurationto copy values from.
-
-
Method Details
-
outputMetadataEarly
Sets whether metadata is output immediately after it is decoded instead of at its presentation time.- Parameters:
outputMetadataEarly- Whether metadata is output immediately after it is decoded.- Returns:
- This builder.
-
endOfStreamMetadataThresholdUs
@NonNull public MetadataConfiguration.Builder endOfStreamMetadataThresholdUs(long endOfStreamMetadataThresholdUs) Sets the end-of-stream metadata threshold, in microseconds.Pending metadata whose presentation time is beyond the period duration is discarded after playback has reached the end of the period plus the specified threshold.
Use
0to discard such metadata immediately at the end of the period, orMetadataConfiguration.DISABLE_END_OF_STREAM_METADATA_THRESHOLD_USto disable this behavior.- Parameters:
endOfStreamMetadataThresholdUs- The end-of-stream metadata threshold, in microseconds.- Returns:
- This builder.
-
get
Returns aMetadataConfigurationbuilt from the parameters previously set.- Returns:
- a
MetadataConfigurationbuilt with parameters of thisMetadataConfiguration.Builder
-