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.JsonableThe 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 AdvertisingBasecopy()java.lang.StringgetAdMessage()AdRulesgetAdRules()AdSourcegetClient()java.lang.StringgetCueText()java.lang.IntegergetRequestTimeout()java.lang.StringgetSkipMessage()intgetSkipOffset()Returns the current skip offset of the adjava.lang.StringgetSkipText()java.lang.BooleangetVpaidControls()voidsetAdMessage(java.lang.String adMessage)Sets a customized ad message.voidsetAdRules(AdRules adRules)Configures Ad Rules that control how frequently ads play back.voidsetClient(AdSource client)voidsetCueText(java.lang.String cueText)Sets the text that appears when a user mouses over a scheduled.voidsetRequestTimeout(java.lang.Integer requestTimeout)voidsetSkipMessage(java.lang.String skipMessage)Sets a customized countdown message.voidsetSkipOffset(int skipOffset)Sets the amount of time in seconds that you want an ad to be watched before it can be skipped.voidsetSkipText(java.lang.String skipText)Sets the text of the Skip button.voidsetVpaidControls(java.lang.Boolean vpaidControls)Enables or disables forcing the display of controls during VPAID adsorg.json.JSONObjecttoJson()
-
-
-
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 AdvertisingExceptionSets 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 AdvertisingExceptionSets 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 AdvertisingExceptionSets 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 AdvertisingExceptionSets 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 AdvertisingExceptionSets 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:
toJsonin interfacecom.longtailvideo.jwplayer.utils.Jsonable
-
-