Class AdvertisingBase
- java.lang.Object
-
- com.longtailvideo.jwplayer.media.ads.AdvertisingBase
-
- All Implemented Interfaces:
com.longtailvideo.jwplayer.utils.Jsonable
- Direct Known Subclasses:
Advertising
,ImaDaiAdvertising
,VMAPAdvertising
public abstract class AdvertisingBase extends java.lang.Object implements com.longtailvideo.jwplayer.utils.Jsonable
The base class for Advertising settings.
-
-
Constructor Summary
Constructors Constructor Description AdvertisingBase(AdSource client)
AdvertisingBase(AdvertisingBase src)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AdvertisingBase
copy()
java.lang.String
getAdMessage()
AdRules
getAdRules()
AdSource
getClient()
java.lang.String
getCueText()
java.lang.Integer
getRequestTimeout()
java.lang.String
getSkipMessage()
int
getSkipOffset()
Returns the current skip offset of the adjava.lang.String
getSkipText()
java.lang.Boolean
getVpaidControls()
void
setAdMessage(java.lang.String adMessage)
Sets a customized ad message.void
setAdRules(AdRules adRules)
Configures Ad Rules that control how frequently ads play back.void
setClient(AdSource client)
void
setCueText(java.lang.String cueText)
Sets the text that appears when a user mouses over a scheduled.void
setRequestTimeout(java.lang.Integer requestTimeout)
void
setSkipMessage(java.lang.String skipMessage)
Sets a customized countdown message.void
setSkipOffset(int skipOffset)
Sets the amount of time in seconds that you want an ad to be watched before it can be skipped.void
setSkipText(java.lang.String skipText)
Sets the text of the Skip button.void
setVpaidControls(java.lang.Boolean vpaidControls)
Enables or disables forcing the display of controls during VPAID adsorg.json.JSONObject
toJson()
-
-
-
Constructor Detail
-
AdvertisingBase
public AdvertisingBase(@NonNull AdSource client)
-
AdvertisingBase
public AdvertisingBase(AdvertisingBase src)
-
-
Method Detail
-
getClient
@NonNull public AdSource getClient()
-
setClient
public void setClient(@NonNull AdSource client)
-
getSkipText
public java.lang.String getSkipText()
-
setSkipText
public void setSkipText(java.lang.String skipText) throws AdvertisingException
Sets the text of the Skip button.Not supported with Google IMA.
- Throws:
AdvertisingException
- thrown when a Skip message is added to an IMA ad
-
getSkipMessage
public java.lang.String getSkipMessage()
-
setSkipMessage
public void setSkipMessage(java.lang.String skipMessage) throws AdvertisingException
Sets a customized countdown message. Use the form Skip ad in xx seconds.Not supported with Google IMA.
- Throws:
AdvertisingException
-
getSkipOffset
public int getSkipOffset()
Returns the current skip offset of the ad- Returns:
- the current skip offset of the ad, or -1 if there's no offset.
-
setSkipOffset
public void setSkipOffset(int skipOffset) throws AdvertisingException
Sets the amount of time in seconds that you want an ad to be watched before it can be skipped.Not supported with Google IMA.
- Parameters:
skipOffset
- the amount of time in seconds that you want the ad to be watched.- Throws:
AdvertisingException
-
getAdMessage
public java.lang.String getAdMessage()
-
setAdMessage
public void setAdMessage(java.lang.String adMessage) throws AdvertisingException
Sets a customized ad message. Use the form 'This ad will end in xx seconds.'.Not supported with Google IMA.
- Throws:
AdvertisingException
-
getCueText
public java.lang.String getCueText()
-
setCueText
public void setCueText(java.lang.String cueText) throws AdvertisingException
Sets the text that appears when a user mouses over a scheduled. advertisement on the seekbar.Not supported with Google IMA.
- Parameters:
cueText
- the text to display.- Throws:
AdvertisingException
-
setVpaidControls
public void setVpaidControls(java.lang.Boolean vpaidControls)
Enables or disables forcing the display of controls during VPAID ads- Parameters:
vpaidControls
-
-
getVpaidControls
@Nullable public java.lang.Boolean getVpaidControls()
- Returns:
- Whether the display of controls is forced during VPAID ads
-
setRequestTimeout
public void setRequestTimeout(java.lang.Integer requestTimeout)
-
getRequestTimeout
public java.lang.Integer getRequestTimeout()
-
setAdRules
public void setAdRules(AdRules adRules)
Configures Ad Rules that control how frequently ads play back.- Parameters:
adRules
-
-
getAdRules
public AdRules getAdRules()
- Returns:
- Current Ad Rules configuration
-
copy
public abstract AdvertisingBase copy()
-
toJson
public org.json.JSONObject toJson()
- Specified by:
toJson
in interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
-