AdBreakStatus
Stay organized with collections
Save and categorize content based on your preferences.
A class that holds status information about an ad break.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
boolean |
|
String
|
|
String
|
getBreakId
() Returns the ID of the current ad break.
|
long |
getCurrentBreakClipTimeInMs
() Returns the current position of the ad break clip, in milliseconds, from the
start of the ad break clip.
|
long |
getCurrentBreakTimeInMs
() Returns the current position of the ad break, in milliseconds, from the start
of the ad break.
|
long |
getWhenSkippableInMs
() Returns the number of milliseconds after the ad break clip starts when the user
can skip the ad break clip.
|
int |
|
void |
|
Inherited Method Summary
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Constants
public static final int
AD_BREAK_CLIP_NOT_SKIPPABLE
Public Methods
public boolean
equals
( Object
other)
public String
getBreakClipId
()
public long
getCurrentBreakClipTimeInMs
()
Returns the current position of the ad break clip, in milliseconds, from the start
of the ad break clip.
public long
getCurrentBreakTimeInMs
()
Returns the current position of the ad break, in milliseconds, from the start of the
ad break.
public long
getWhenSkippableInMs
()
public void
writeToParcel
( Parcel
out, int
flags)
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\u003c/code\u003e provides status information about an ad break, including current position and skippability.\u003c/p\u003e\n"],["\u003cp\u003eIt holds the IDs of the current ad break and ad break clip, allowing retrieval of corresponding \u003ccode\u003eAdBreakInfo\u003c/code\u003e and \u003ccode\u003eAdBreakClipInfo\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access information like current position within the ad break/clip and when the ad becomes skippable.\u003c/p\u003e\n"],["\u003cp\u003eIt's \u003ccode\u003eParcelable\u003c/code\u003e, enabling it to be passed between components.\u003c/p\u003e\n"],["\u003cp\u003eIncludes deprecated constant \u003ccode\u003eAD_BREAK_CLIP_NOT_SKIPPABLE\u003c/code\u003e; use \u003ccode\u003eAdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE\u003c/code\u003e instead.\u003c/p\u003e\n"]]],["`AdBreakStatus` holds information about an ad break. Key actions include retrieving the current ad break's ID and clip ID via `getBreakId()` and `getBreakClipId()`, respectively. It provides timing details, like the current position within the ad break and clip (`getCurrentBreakTimeInMs()`, `getCurrentBreakClipTimeInMs()`). `getWhenSkippableInMs()` indicates the skip time, if applicable. The class also handles equality checks, hashing, and parceling data for Android. A deprecated constant, `AD_BREAK_CLIP_NOT_SKIPPABLE`, is noted.\n"],null,["public class **AdBreakStatus** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nA class that holds status information about an ad break. \n\nNested Class Summary\n\n|-------|---|---|--------------------------------------------------------------------------------------------------|\n| class | [AdBreakStatus.Builder](/android/reference/com/google/android/gms/cast/AdBreakStatus.Builder) || Builder class for [AdBreakStatus](/android/reference/com/google/android/gms/cast/AdBreakStatus). |\n\nConstant Summary\n\n|-----|-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakStatus#AD_BREAK_CLIP_NOT_SKIPPABLE) | *This constant is deprecated. This constant is essentially the same as [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE) but this constant has the wrong type historically. Use [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE) instead.* |\n\nInherited Constant Summary \nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\nPublic Method Summary\n\n|-------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/android/gms/cast/AdBreakStatus#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) other) |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getBreakClipId](/android/reference/com/google/android/gms/cast/AdBreakStatus#getBreakClipId())() Returns the ID of the current ad break clip. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getBreakId](/android/reference/com/google/android/gms/cast/AdBreakStatus#getBreakId())() Returns the ID of the current ad break. |\n| long | [getCurrentBreakClipTimeInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus#getCurrentBreakClipTimeInMs())() Returns the current position of the ad break clip, in milliseconds, from the start of the ad break clip. |\n| long | [getCurrentBreakTimeInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus#getCurrentBreakTimeInMs())() Returns the current position of the ad break, in milliseconds, from the start of the ad break. |\n| long | [getWhenSkippableInMs](/android/reference/com/google/android/gms/cast/AdBreakStatus#getWhenSkippableInMs())() Returns the number of milliseconds after the ad break clip starts when the user can skip the ad break clip. |\n| int | [hashCode](/android/reference/com/google/android/gms/cast/AdBreakStatus#hashCode())() |\n| void | [writeToParcel](/android/reference/com/google/android/gms/cast/AdBreakStatus#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags) |\n\nInherited Method Summary \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\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nConstants \n\npublic static final int\n**AD_BREAK_CLIP_NOT_SKIPPABLE** \n**This constant is deprecated.** \n\nThis constant is essentially the same as [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE) but this constant has the wrong\ntype historically. Use [AdBreakClipInfo.AD_BREAK_CLIP_NOT_SKIPPABLE](/android/reference/com/google/android/gms/cast/AdBreakClipInfo#AD_BREAK_CLIP_NOT_SKIPPABLE) instead. \nConstant Value: -1\n\nPublic Methods \n\npublic boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) other) \n\npublic [String](//developer.android.com/reference/java/lang/String.html) **getBreakClipId** () \nReturns the ID of the current ad break clip. The corresponding [AdBreakClipInfo](/android/reference/com/google/android/gms/cast/AdBreakClipInfo)\ncan be obtained by looking up the ID in the list returned by [MediaInfo.getAdBreakClips()](/android/reference/com/google/android/gms/cast/MediaInfo#getAdBreakClips()). \n\npublic [String](//developer.android.com/reference/java/lang/String.html) **getBreakId** () \nReturns the ID of the current ad break. The corresponding [AdBreakInfo](/android/reference/com/google/android/gms/cast/AdBreakInfo)\ncan be obtained by looking up the ID in the list returned by [MediaInfo.getAdBreaks()](/android/reference/com/google/android/gms/cast/MediaInfo#getAdBreaks()). \n\npublic long **getCurrentBreakClipTimeInMs** () \nReturns the current position of the ad break clip, in milliseconds, from the start\nof the ad break clip. \n\npublic long **getCurrentBreakTimeInMs** () \nReturns the current position of the ad break, in milliseconds, from the start of the\nad break. \n\npublic long **getWhenSkippableInMs** () \nReturns the number of milliseconds after the ad break clip starts when the user can\nskip the ad break clip. If this method returns [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\npublic int **hashCode** () \n\npublic void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags)"]]