Package com.castlabs.sdk.mux
Class MuxPlugin.MetadataBuilder
java.lang.Object
com.castlabs.sdk.mux.MuxPlugin.MetadataBuilder
- Enclosing class:
MuxPlugin
A helper class to build
AnalyticsMetaData objects for the Mux 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 TypeMethodDescriptioncustomerData(com.mux.stats.sdk.core.model.CustomerData customerData) Sets Mux customer data.customOptions(com.mux.stats.sdk.core.CustomOptions customOptions) Sets Mux custom options.get()Returns the finalAnalyticsMetaDataobject.keepSessionInBackground(boolean keepSessionInBackground) Sets whether the Mux session should be kept alive when the app is backgrounded.
-
Constructor Details
-
MetadataBuilder
Creates a new builder.- Parameters:
live- true if the current content is a live stream and false otherwise.assetId- The asset ID uniquely identifies the content.
-
MetadataBuilder
Creates a new builder starting from an existingAnalyticsMetaDataobject.- Parameters:
analyticsMetaData- The base metadata.
-
-
Method Details
-
customerData
@NonNull public MuxPlugin.MetadataBuilder customerData(@NonNull com.mux.stats.sdk.core.model.CustomerData customerData) Sets Mux customer data.- Parameters:
customerData- The Mux customer data.- Returns:
- this builder.
-
customOptions
@NonNull public MuxPlugin.MetadataBuilder customOptions(@Nullable com.mux.stats.sdk.core.CustomOptions customOptions) Sets Mux custom options. Passing null removes previously configured options.- Parameters:
customOptions- The Mux custom options, or null to remove them.- Returns:
- this builder.
-
keepSessionInBackground
Sets whether the Mux session should be kept alive when the app is backgrounded. This value overrides the default configured onMuxPluginfor this session.- Parameters:
keepSessionInBackground- whether to keep the session alive in the background.- Returns:
- this builder.
-
get
Returns the finalAnalyticsMetaDataobject.- Returns:
- The analytics metadata.
-