AdService
A class that allows the display of mobile video ads.
This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
| Memory category | Instances |
|---|
Member index 30
Removed member index 3
| History | Member | |
|---|---|---|
| 657 | GetAdAvailability(adFormat: AdFormat): Variant | |
| 657 | AdAvailabilityChanged(adFormat: AdFormat, adAvailabilityResult: Variant) | |
| 655 | ShowStaticEudsaDisclosure() |
Description
A service for displaying mobile video ads as a form of monetization. Use it to implement rewarded video ads in your experience.
History 58
- 681 Add UnregisterAdOpportunity
- 681 Add RegisterAdOpportunityAsync
- 676 Add
- 675 Change Parameters of from (rewardDetails: string, placementId: int64) to (rewardDetails: string)
- 675 Change Parameters of from (rewardDetails: string) to (rewardDetails: string, placementId: int64)
- 675 Change Parameters of ShowRewardedVideoAdAsync from (player: Player, reward: AdReward) to (player: Player, reward: AdReward, placementId: int64?)
- 674 Add RewardedVideoAdStarted
- 674 Add RewardedVideoAdEnded
- 657 Add onDemandVideoPlayInUI
- 657 Remove AdAvailabilityChanged
- 657 Add OnDemandVideoCompleteFromUI
- 657 Add HandleWhyThisAdClicked
- 657 Add GetAdAvailabilityNowAsync
- 657 Remove GetAdAvailability
- 655 Add
- 655 Add
- 655 Remove ShowStaticEudsaDisclosure
- 655 Add ShowReportAdPopup
- 655 Add AdAvailabilityChanged
- 655 Add ShowRewardedVideoAdAsync
- 655 Add GetAdAvailability
- 655 Add CreateAdRewardFromDevProductId
- 627 Add adGuiRegisterUI
- 627 Add SetAdGuiInteractivityHandlerInitialized
- 617 Add ShowDynamicEudsaDisclosure
- 612 Add ShowStaticEudsaDisclosure
- 612 Add HideEudsaDisclosure
- 587 Change Parameters of PortalPrompt from (destinationId: int64, player: Player, portal: Instance) to (destinationId: int64, portal: Instance, requiresNoButton: bool)
- 583 Add PortalPrompt
- 580 Add GetReportAdInfo
- 573 Change ReturnType of ShowVideoAd from void to null
- 573 Change ReturnType of ReturnToPublisherExperience from void to null
- 565 Add ReturnToPublisherExperience
- 565 Add GetAdTeleportInfo
- 557 Change Parameters of from (request: string) to (uuid: string, request: string)
- 557 Change Parameters of from (response: string, isError: bool) to (uuid: string, response: string, isError: bool)
- 554 Change Parameters of from (uuid: string, request: string) to (request: string)
- 554 Change Parameters of from (uuid: string, response: string, isError: bool) to (response: string, isError: bool)
- 555 Change Parameters of from (request: string) to (uuid: string, request: string)
- 555 Change Parameters of from (response: string, isError: bool) to (uuid: string, response: string, isError: bool)
- 553 Add
- 553 Add
- 553 Add
- 553 Add
- 547 Add AdTeleportInitiated
- 547 Add AdTeleportEnded
- 462 Change ThreadSafety of VideoAdClosed from to Unsafe
- 462 Change ThreadSafety of ShowVideoAd from to Unsafe
- 323 Add VideoAdClosed
- 323 Add ShowVideoAd
- 322 Remove VideoAdClosed
- 322 Remove ShowVideoAd
- 292 Change Tags of VideoAdClosed from [] to [Deprecated]
- 292 Change Tags of ShowVideoAd from [] to [Deprecated]
- 212 Change Parameters of VideoAdClosed from () to (adShown: bool)
- 151 Add VideoAdClosed
- 151 Add ShowVideoAd
- 151 Add AdService
Members 30
AdTeleportEnded
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 547 Add AdTeleportEnded
AdTeleportInitiated
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
CreateAdRewardFromDevProductId
| Parameters (1) | ||
|---|---|---|
| devProductId | int64 | |
| Returns (1) | ||
| AdReward | ||
Creates a reward to give users who watch an entire video ad.
| Thread safety | Unsafe |
|---|
History 1
GetAdAvailabilityNowAsync
| Parameters (1) | ||
|---|---|---|
| adFormat | AdFormat | |
| Returns (1) | ||
| Variant | ||
Checks if a video ad is available to be played to the current user inside the experience.
This function yields. It will block the calling thread until completion.
| Thread safety | Unsafe |
|---|
History 1
GetAdTeleportInfo
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Tuple | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 565 Add GetAdTeleportInfo
GetReportAdInfo
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| Array | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 580 Add GetReportAdInfo
HandleWhyThisAdClicked
| Parameters (2) | ||
|---|---|---|
| advertiserName | string | |
| payerName | string | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
HideEudsaDisclosure
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
OnDemandVideoCompleteFromUI
| Parameters (4) | ||
|---|---|---|
| result | ShowAdResult | |
| encryptedAdTrackingData | string | |
| encryptionMetadata | string | |
| rewardDetails | string | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
PortalPrompt
| Parameters (3) | |
|---|---|
| destinationId | int64 |
| portal | Instance |
| requiresNoButton | bool |
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 2
- 587 Change Parameters of PortalPrompt from (destinationId: int64, player: Player, portal: Instance) to (destinationId: int64, portal: Instance, requiresNoButton: bool)
- 583 Add PortalPrompt
RegisterAdOpportunityAsync
| Parameters (2) | ||
|---|---|---|
| instance | Instance | |
| placementId | int64? | |
| Returns (1) | ||
| null | ||
This function yields. It will block the calling thread until completion.
| Thread safety | Unsafe |
|---|
History 1
ReturnToPublisherExperience
| Parameters (1) | ||
|---|---|---|
| adTeleportMethod | AdTeleportMethod | |
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 2
- 573 Change ReturnType of ReturnToPublisherExperience from void to null
- 565 Add ReturnToPublisherExperience
RewardedVideoAdEnded
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
RewardedVideoAdStarted
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
SetAdGuiInteractivityHandlerInitialized
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
ShowDynamicEudsaDisclosure
| Parameters (2) | |
|---|---|
| advertiserName | string |
| payerName | string |
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
ShowReportAdPopup
| Parameters (1) | |
|---|---|
| adInfo | Dictionary |
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 655 Add ShowReportAdPopup
ShowRewardedVideoAdAsync
| Parameters (3) | ||
|---|---|---|
| player | Player | |
| reward | AdReward | |
| placementId | int64? | |
| Returns (1) | ||
| ShowAdResult | ||
Plays the video ad to the current user inside the experience.
This function yields. It will block the calling thread until completion.
| Thread safety | Unsafe |
|---|
History 2
- 675 Change Parameters of ShowRewardedVideoAdAsync from (player: Player, reward: AdReward) to (player: Player, reward: AdReward, placementId: int64?)
- 655 Add ShowRewardedVideoAdAsync
ShowVideoAd
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
Show mobile video advertisements.
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.
| Thread safety | Unsafe |
|---|
History 6
- 573 Change ReturnType of ShowVideoAd from void to null
- 462 Change ThreadSafety of ShowVideoAd from to Unsafe
- 323 Add ShowVideoAd
- 322 Remove ShowVideoAd
- 292 Change Tags of ShowVideoAd from [] to [Deprecated]
- 151 Add ShowVideoAd
UnregisterAdOpportunity
| Parameters (1) | ||
|---|---|---|
| instance | Instance | |
| Returns (1) | ||
| null | ||
| Thread safety | Unsafe |
|---|
History 1
VideoAdClosed
| Parameters (1) | |
|---|---|
| adShown | bool |
Fires when an AdService video closes.
This event is deprecated. It exists only for backward compatibility, and should not be used for new work.
| Thread safety | Unsafe |
|---|
History 6
- 462 Change ThreadSafety of VideoAdClosed from to Unsafe
- 323 Add VideoAdClosed
- 322 Remove VideoAdClosed
- 292 Change Tags of VideoAdClosed from [] to [Deprecated]
- 212 Change Parameters of VideoAdClosed from () to (adShown: bool)
- 151 Add VideoAdClosed
adGuiRegisterUI
| Parameters (1) | |
|---|---|
| adGui | Instance |
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
- 627 Add adGuiRegisterUI
onDemandVideoPlayInUI
| Parameters (1) | ||
|---|---|---|
| data | Dictionary | |
| Returns (1) | ||
| VideoFrame | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |
History 1
Removed members 3
AdAvailabilityChanged
| Parameters (2) | |
|---|---|
| adFormat | AdFormat |
| adAvailabilityResult | Variant |
| Thread safety | Unsafe |
|---|
History 2
- 657 Remove AdAvailabilityChanged
- 655 Add AdAvailabilityChanged
GetAdAvailability
| Parameters (1) | ||
|---|---|---|
| adFormat | AdFormat | |
| Returns (1) | ||
| Variant | ||
| Thread safety | Unsafe |
|---|
History 2
- 657 Remove GetAdAvailability
- 655 Add GetAdAvailability
ShowStaticEudsaDisclosure
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Security | RobloxScriptSecurity |
|---|---|
| Thread safety | Unsafe |