Package com.castlabs.sdk.conviva
Class ConvivaPlugin.MetadataBuilder
java.lang.Object
com.castlabs.sdk.conviva.ConvivaPlugin.MetadataBuilder
- Enclosing class:
ConvivaPlugin
A helper class to build
AnalyticsMetaData objects for the Conviva plugin.-
Constructor Summary
ConstructorsConstructorDescriptionMetadataBuilder(boolean live, String assetId) Creates a new builder.MetadataBuilder(AnalyticsMetaData analyticsMetaData) Creates a new builder starting from an existingAnalyticsMetaDataobject. -
Method Summary
Modifier and TypeMethodDescriptionSets Conviva ad tags.contentMetadata(Bundle contentMetadata) Sets Conviva content metadata.customTags(Bundle customTags) Sets Conviva custom tags.get()Returns the finalAnalyticsMetaDataobject.includeAudioBitrateInAverage(boolean includeAudioBitrateInAverage) Sets whether audio bitrate should be included in Conviva average bitrate metrics.Sets the viewer ID.
-
Constructor Details
-
MetadataBuilder
Creates a new builder.- Parameters:
live- true if the current content is a live stream and false otherwiseassetId- The asset ID uniquely identifies the content
-
MetadataBuilder
Creates a new builder starting from an existingAnalyticsMetaDataobject.- Parameters:
analyticsMetaData- The base metadata.
-
-
Method Details
-
viewerId
Sets the viewer ID.- Parameters:
viewerId- An identifier for the current user, or null.- Returns:
- this builder.
-
contentMetadata
Sets Conviva content metadata.- Parameters:
contentMetadata- ABundlewith Conviva content metadata.- Returns:
- this builder.
-
customTags
Sets Conviva custom tags.- Parameters:
customTags- ABundlewith custom tags, or null to remove them.- Returns:
- this builder.
-
adTags
Sets Conviva ad tags.- Parameters:
adTags- ABundlewith ad tags, or null to remove them.- Returns:
- this builder.
-
includeAudioBitrateInAverage
@NonNull public ConvivaPlugin.MetadataBuilder includeAudioBitrateInAverage(boolean includeAudioBitrateInAverage) Sets whether audio bitrate should be included in Conviva average bitrate metrics. Default is true. Set to false to report video bitrate only; audio-only streams will report average bitrate as 0.- Parameters:
includeAudioBitrateInAverage- Whether to include audio bitrate in average bitrate.- Returns:
- this builder.
-
get
Returns the finalAnalyticsMetaDataobject.- Returns:
- The analytics metadata.
-