Package com.castlabs.sdk.broadpeak
Class BroadpeakPlugin.MetadataBuilder
java.lang.Object
com.castlabs.sdk.broadpeak.BroadpeakPlugin.MetadataBuilder
- Enclosing class:
BroadpeakPlugin
A helper class to build
AnalyticsMetaData
objects for the Broadpeak plugin.- Since:
- 4.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataBuilder
(boolean live, String assetId) Creates a new builder.MetadataBuilder
(AnalyticsMetaData analyticsMetaData) Creates a new builder starting from an existingAnalyticsMetaData
object. -
Method Summary
Modifier and TypeMethodDescriptioncustomParameters
(Bundle customParameters) Sets custom Broadpeak parameters, which will be added to theStreamingSession
.get()
Returns the finalAnalyticsMetaData
object.options
(SparseArray<Object> options) Sets custom Broadpeak options, which will be added to theStreamingSession
.precache
(boolean precacheEnabled) Enables or disables the precache feature.
-
Constructor Details
-
MetadataBuilder
Creates a new builder starting from an existingAnalyticsMetaData
object.- Parameters:
analyticsMetaData
- The base metadata.
-
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
-
-
Method Details
-
customParameters
Sets custom Broadpeak parameters, which will be added to theStreamingSession
. The params must be String values.- Parameters:
customParameters
- ABundle
with the custom parameters.- Returns:
- this builder.
-
options
Sets custom Broadpeak options, which will be added to theStreamingSession
. Keys for these options are declared inStreamingSessionOptions
. Values must be boolean, int or String.- Parameters:
options
- ASparseArray
with the options.- Returns:
- this builder.
-
precache
Enables or disables the precache feature.- Parameters:
precacheEnabled
- whether to enable the precache or not.- Returns:
- this builder.
-
get
Returns the finalAnalyticsMetaData
object.- Returns:
- The analytics metadata.
-