Class BroadpeakPlugin.MetadataBuilder

java.lang.Object
com.castlabs.sdk.broadpeak.BroadpeakPlugin.MetadataBuilder
Enclosing class:
BroadpeakPlugin

public static final class BroadpeakPlugin.MetadataBuilder extends Object
A helper class to build AnalyticsMetaData objects for the Broadpeak plugin.
Since:
4.4.0
  • Constructor Details

    • MetadataBuilder

      public MetadataBuilder(@NonNull AnalyticsMetaData analyticsMetaData)
      Creates a new builder starting from an existing AnalyticsMetaData object.
      Parameters:
      analyticsMetaData - The base metadata.
    • 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
  • Method Details

    • customParameters

      @NonNull public BroadpeakPlugin.MetadataBuilder customParameters(@NonNull Bundle customParameters)
      Sets custom Broadpeak parameters, which will be added to the StreamingSession. The params must be String values.
      Parameters:
      customParameters - A Bundle with the custom parameters.
      Returns:
      this builder.
    • options

      @NonNull public BroadpeakPlugin.MetadataBuilder options(@NonNull SparseArray<Object> options)
      Sets custom Broadpeak options, which will be added to the StreamingSession. Keys for these options are declared in StreamingSessionOptions. Values must be boolean, int or String.
      Parameters:
      options - A SparseArray with the options.
      Returns:
      this builder.
    • precache

      @NonNull public BroadpeakPlugin.MetadataBuilder precache(boolean precacheEnabled)
      Enables or disables the precache feature.
      Parameters:
      precacheEnabled - whether to enable the precache or not.
      Returns:
      this builder.
    • get

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