AdBreakStatus.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Public Methods
Sets the ID of the current ad break clip.
Sets the ID of the current ad break.
public AdBreakStatus.Builder
setCurrentBreakClipTimeInMs
(long currentBreakClipTimeInMs)
Sets the current position of the ad break clip, in milliseconds, from the start of
the ad break clip.
public AdBreakStatus.Builder
setCurrentBreakTimeInMs
(long currentBreakTimeInMs)
Sets the current position of the ad break, in milliseconds, from the start of the ad
break.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eAdBreakStatus.Builder\u003c/code\u003e is a utility class used to construct instances of \u003ccode\u003eAdBreakStatus\u003c/code\u003e, providing information about the current state of an ad break.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to set details like the ad break and clip IDs, current positions within the break and clip, and when the ad becomes skippable.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize the \u003ccode\u003ebuild()\u003c/code\u003e method to create an immutable \u003ccode\u003eAdBreakStatus\u003c/code\u003e object after setting the desired properties.\u003c/p\u003e\n"],["\u003cp\u003eThe builder pattern simplifies the process of creating \u003ccode\u003eAdBreakStatus\u003c/code\u003e objects by offering a chainable API for setting various attributes.\u003c/p\u003e\n"]]],[],null,["# AdBreakStatus.Builder\n\npublic static class **AdBreakStatus.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder class for [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus). \n\n### Public Constructor Summary\n\n|---|---------------------------------------------------------------------------------------------|\n| | [Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#Builder())() |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus) | [build](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#build())() Builds an [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus). |\n| [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) | [setBreakClipId](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#setBreakClipId(java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) breakClipId) Sets the ID of the current ad break clip. |\n| [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) | [setBreakId](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#setBreakId(java.lang.String))([String](//developer.android.com/reference/java/lang/String.html) breakId) Sets the ID of the current ad break. |\n| [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) | [setCurrentBreakClipTimeInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#setCurrentBreakClipTimeInMs(long))(long currentBreakClipTimeInMs) Sets the current position of the ad break clip, in milliseconds, from the start of the ad break clip. |\n| [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) | [setCurrentBreakTimeInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#setCurrentBreakTimeInMs(long))(long currentBreakTimeInMs) Sets the current position of the ad break, in milliseconds, from the start of the ad break. |\n| [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) | [setWhenSkippableInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder#setWhenSkippableInMs(long))(long whenSkippableInMs) Sets the number of milliseconds after the ad break clip starts when the user can skip the ad break clip. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **Builder** ()\n\nPublic Methods\n--------------\n\n#### public [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus)\n**build** ()\n\nBuilds an [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus). \n\n#### public [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder)\n**setBreakClipId** ([String](//developer.android.com/reference/java/lang/String.html) breakClipId)\n\nSets the ID of the current ad break clip. \n\n#### public [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder)\n**setBreakId** ([String](//developer.android.com/reference/java/lang/String.html) breakId)\n\nSets the ID of the current ad break. \n\n#### public [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder)\n**setCurrentBreakClipTimeInMs** (long currentBreakClipTimeInMs)\n\nSets the current position of the ad break clip, in milliseconds, from the start of\nthe ad break clip. \n\n#### public [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder)\n**setCurrentBreakTimeInMs** (long currentBreakTimeInMs)\n\nSets the current position of the ad break, in milliseconds, from the start of the ad\nbreak. \n\n#### public [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder)\n**setWhenSkippableInMs** (long whenSkippableInMs)\n\nSets the number of milliseconds after the ad break clip starts when the user can\nskip the ad break clip.\n\nIf set as [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE), then the ad break cannot be\nskipped.\n\nThe default value is [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE)."]]