# This file is automatically generated. Please don't edit it manually. # To submit a bug report on the content, see # https://devforum.roblox.com/c/bug-reports/documentation-issues/72 name: AdService type: class memory_category: Instances summary: | A class that allows the display of mobile video ads. description: | A service for displaying mobile video ads as a form of monetization. Use it to implement rewarded video ads in your experience. code_samples: [] inherits: - Instance descendants: [] tags: - NotCreatable - Service deprecation_message: '' properties: [] methods: - name: AdService:CreateAdRewardFromDevProductId summary: | Creates a reward to give users who watch an entire video ad. description: | Creates a reward to give users who watch an entire video ad. code_samples: [] parameters: - name: devProductId type: int64 default: summary: | The ID of the developer product you want to grant as a reward. returns: - type: AdReward summary: '' tags: [] deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] - name: AdService:GetAdAvailabilityNowAsync summary: | Checks if a video ad is available to be played to the current user inside the experience. description: | Checks if a video ad is available to be played to the current user inside the experience. code_samples: - AdService-GetAdAvailabilityNowAsync parameters: - name: adFormat type: AdFormat default: summary: | The format of the requested ad. For example, `RewardedVideo`. returns: - type: Variant summary: '' tags: - Yields deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] - name: AdService:RegisterAdOpportunityAsync summary: | Tracks how many times a user had the chance to watch a video ad and the rate at which they actually watched the ad. description: '' code_samples: - AdService-RegisterAdOpportunityAsync parameters: - name: instance type: Instance default: summary: '' - name: placementId type: int64? default: summary: | The ID of the placement of the rewarded video ad inside the experience. Allows for reporting on the performance of individual ad placements. returns: - type: () summary: '' tags: - Yields deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] - name: AdService:ShowRewardedVideoAdAsync summary: | Plays the video ad to the current user inside the experience. description: | Plays the video ad to the current user inside the experience. code_samples: - AdService-ShowRewardedVideoAdAsync parameters: - name: player type: Player default: summary: | The `Player` object for whom you are fetching the ad for. - name: reward type: AdReward default: summary: | The reward object for the reward you want to grant the user who watches an ad to completion. - name: placementId type: int64? default: summary: | The ID of the placement of the rewarded video ad inside the experience. Allows for reporting on the performance of individual ad placements. returns: - type: ShowAdResult summary: '' tags: - Yields deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] - name: AdService:ShowVideoAd summary: | Show mobile video advertisements. description: | Show mobile video advertisements. code_samples: [] parameters: [] returns: - type: () summary: '' tags: - Deprecated deprecation_message: | `Class.AdService.ShowVideoAd|ShowVideoAd` has been decommissioned and is no longer operational. security: None thread_safety: Unsafe capabilities: [] - name: AdService:UnregisterAdOpportunity summary: '' description: '' code_samples: [] parameters: - name: instance type: Instance default: summary: '' returns: - type: () summary: '' tags: [] deprecation_message: '' security: None thread_safety: Unsafe capabilities: [] events: - name: AdService.VideoAdClosed summary: | Fires when an `Class.AdService` video closes. description: | Fires when an `Class.AdService` video closes. code_samples: [] parameters: - name: adShown type: boolean default: summary: '' tags: - Deprecated deprecation_message: | `Class.AdService.VideoAdClosed|VideoAdClosed` has been decommissioned and is no longer operational. security: None capabilities: [] callbacks: []