Package com.castlabs.sdk.yospace
Class YospacePlugin
java.lang.Object
com.castlabs.android.Plugin
com.castlabs.sdk.yospace.YospacePlugin
- All Implemented Interfaces:
AdProvider,ServerAdProvider
PRESTOplay integration for Yospace server-side ad insertion.
- Since:
- 4.5.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for the Yospace values stored inAnalyticsMetaData.static enumWhat to do when a playable stream has no Yospace analytics.static enumWhat to do when an active analytics session times out. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName used by the server-side ad provider registry.static final StringKey inCastlabsPlayerException.getErrorData()carrying the Yospace result code of a failed session initialization.static intMaximum time spent waiting for Yospace to return the playback URL. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a plugin with playback-preserving error defaults.YospacePlugin(YospacePlugin.NoAnalyticsBehavior noAnalyticsBehavior, YospacePlugin.TimeoutBehavior timeoutBehavior) Creates a plugin with explicit session error behavior. -
Method Summary
Modifier and TypeMethodDescriptioncreateAdLoader(PlayerConfig config) getId()getName()voidstatic voidsetDebugFlags(int flags) Enables Yospace diagnostic flags, includingYoLog.DEBUG_VALIDATION.voidsetDefaultPlaybackPolicyHandler(com.yospace.yospacefeatures.PlaybackPolicyHandler handler) Sets the default policy used by new controller components.voidsetEnabled(boolean enabled) Enables or disables components created after this call.Methods inherited from class com.castlabs.android.Plugin
onRemotePlay
-
Field Details
-
AD_PROVIDER_NAME
Name used by the server-side ad provider registry.- See Also:
-
SESSION_START_TIMEOUT_MS
public static int SESSION_START_TIMEOUT_MSMaximum time spent waiting for Yospace to return the playback URL. -
ERROR_DATA_RESULT_CODE
Key inCastlabsPlayerException.getErrorData()carrying the Yospace result code of a failed session initialization. The entry is only present when a result code was reported.- See Also:
-
-
Constructor Details
-
YospacePlugin
public YospacePlugin()Creates a plugin with playback-preserving error defaults. -
YospacePlugin
public YospacePlugin(@NonNull YospacePlugin.NoAnalyticsBehavior noAnalyticsBehavior, @NonNull YospacePlugin.TimeoutBehavior timeoutBehavior) Creates a plugin with explicit session error behavior.- Parameters:
noAnalyticsBehavior- behavior for sessions without analyticstimeoutBehavior- behavior for mid-playback session timeouts
-
-
Method Details
-
setEnabled
public void setEnabled(boolean enabled) Enables or disables components created after this call.- Parameters:
enabled- whether new controller components are enabled
-
setDefaultPlaybackPolicyHandler
public void setDefaultPlaybackPolicyHandler(@Nullable com.yospace.yospacefeatures.PlaybackPolicyHandler handler) Sets the default policy used by new controller components.- Parameters:
handler- default handler, ornullfor the built-in policy
-
setDebugFlags
public static void setDebugFlags(int flags) Enables Yospace diagnostic flags, includingYoLog.DEBUG_VALIDATION.- Parameters:
flags- bitwise combination ofYoLogdebug flags
-
init
-
getId
-
getName
- Specified by:
getNamein interfaceAdProvider
-
createAdLoader
- Specified by:
createAdLoaderin interfaceServerAdProvider
-