Package com.castlabs.sdk.yospace
Class YospacePlugin.MetadataBuilder
java.lang.Object
com.castlabs.sdk.yospace.YospacePlugin.MetadataBuilder
- Enclosing class:
YospacePlugin
Builder for the Yospace values stored in
AnalyticsMetaData.-
Constructor Summary
ConstructorsConstructorDescriptionMetadataBuilder(boolean live, String assetId) Creates metadata for a VOD or DVR-live stream.MetadataBuilder(AnalyticsMetaData metadata) Adds Yospace values to existing analytics metadata. -
Method Summary
Modifier and TypeMethodDescriptioncustomHttpHeaders(Map<String, String> headers) Sets headers used by Yospace's manifest and analytics requests.get()Returns the configured metadata.Overrides the plugin behavior when analytics are unavailable.requestTimeoutMs(int timeoutMs) Sets the Yospace initialization request timeout in milliseconds.timeoutBehavior(YospacePlugin.TimeoutBehavior behavior) Overrides the plugin behavior when analytics time out.Sets the optional client-side session identity.Sets the user agent used by Yospace requests.
-
Constructor Details
-
MetadataBuilder
Creates metadata for a VOD or DVR-live stream.- Parameters:
live-truefor DVR live,falsefor VODassetId- the application's asset identifier
-
MetadataBuilder
Adds Yospace values to existing analytics metadata.- Parameters:
metadata- metadata to update
-
-
Method Details
-
token
Sets the optional client-side session identity.- Parameters:
token- session identity- Returns:
- this builder
-
userAgent
Sets the user agent used by Yospace requests.- Parameters:
userAgent- user agent value- Returns:
- this builder
-
customHttpHeaders
@NonNull public YospacePlugin.MetadataBuilder customHttpHeaders(@NonNull Map<String, String> headers) Sets headers used by Yospace's manifest and analytics requests.- Parameters:
headers- headers to send- Returns:
- this builder
-
requestTimeoutMs
Sets the Yospace initialization request timeout in milliseconds.- Parameters:
timeoutMs- request timeout in milliseconds- Returns:
- this builder
-
noAnalyticsBehavior
@NonNull public YospacePlugin.MetadataBuilder noAnalyticsBehavior(@NonNull YospacePlugin.NoAnalyticsBehavior behavior) Overrides the plugin behavior when analytics are unavailable.- Parameters:
behavior- desired behavior- Returns:
- this builder
-
timeoutBehavior
@NonNull public YospacePlugin.MetadataBuilder timeoutBehavior(@NonNull YospacePlugin.TimeoutBehavior behavior) Overrides the plugin behavior when analytics time out.- Parameters:
behavior- desired behavior- Returns:
- this builder
-
get
Returns the configured metadata.- Returns:
- configured metadata
-