Class MuxPlugin.MetadataBuilder

java.lang.Object
com.castlabs.sdk.mux.MuxPlugin.MetadataBuilder
Enclosing class:
MuxPlugin

public static final class MuxPlugin.MetadataBuilder extends Object
A helper class to build AnalyticsMetaData objects for the Mux plugin.
  • Constructor Details

    • MetadataBuilder

      public MetadataBuilder(boolean live, @NonNull String assetId)
      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

      public MetadataBuilder(@NonNull AnalyticsMetaData analyticsMetaData)
      Creates a new builder starting from an existing AnalyticsMetaData object.
      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

      @NonNull public MuxPlugin.MetadataBuilder keepSessionInBackground(boolean keepSessionInBackground)
      Sets whether the Mux session should be kept alive when the app is backgrounded. This value overrides the default configured on MuxPlugin for this session.
      Parameters:
      keepSessionInBackground - whether to keep the session alive in the background.
      Returns:
      this builder.
    • get

      @NonNull public AnalyticsMetaData get()
      Returns the final AnalyticsMetaData object.
      Returns:
      The analytics metadata.