CaptureService
A service which provides control over screenshot capture features.
Memory category | Instances |
---|
Member index 28
Removed member index 2
History | Member | |
---|---|---|
651 | PostToFeedAsync(capturePath: string, feedCategory: string): Dictionary | |
583 | RetreiveCaptures(): Array |
Description
CaptureService is a client-side service that allows developers to control how the screenshot capture feature integrates with their experiences. It can be used to include preset moments where a screenshot is automatically taken for a user, and that user can then save, share, or delete the screenshot.
History 55
- 651 Remove PostToFeedAsync
- 645 Change Parameters of UserCaptureSaved from (captureContentId: Content) to (captureContentId: ContentId)
- 645 Change Parameters of OpenShareCapturePrompt from (promptId: int64, contentId: Content, launchData: string) to (promptId: int64, contentId: ContentId, launchData: string)
- 645 Change Parameters of SaveScreenshotCapture from () to (additionalInfo: string = )
- 645 Change Parameters of PromptShareCapture from (contentId: Content, launchData: string, onAcceptedCallback: Function, onDeniedCallback: Function) to (contentId: ContentId, launchData: string, onAcceptedCallback: Function, onDeniedCallback: Function)
- 645 Change Parameters of GetCaptureSizeAsync from (captureContentId: Content) to (captureContentId: ContentId)
- 645 Change Parameters of GetCaptureFilePathAsync from (captureContentId: Content) to (captureContentId: ContentId)
- 644 Add PostToFeedAsync
- 641 Add GetCaptureUploadDataAsync
- 632 Change Tags of CaptureSaved from [] to [Deprecated]
- 632 Change PreferredDescriptor of CaptureSaved from to UserCaptureSaved
- 632 Add CreatePostAsync
- 626 Change Parameters of CaptureSavedInternal from (captureInfo: Dictionary) to (captureInfo: Dictionary, triggerSource: string)
- 625 Add
- 625 Add
- 625 Add SaveCapturesToExternalStorageAsync
- 625 Add OnCaptureShared
- 625 Change Tags of CaptureService from [NotCreatable, Service, NotReplicated] to [NotCreatable, Service]
- 621 Add CaptureSavedInternal
- 620 Add DeleteCapturesAsync
- 617 Add GetCaptureStorageSizeAsync
- 610 Change Parameters of OpenShareCapturePrompt from (promptId: int64, contentId: Content, capturePath: string, launchData: string) to (promptId: int64, contentId: Content, launchData: string)
- 610 Add GetCaptureFilePathAsync
- 608 Add CaptureScreenshot
- 605 Change Parameters of OpenShareCapturePrompt from (promptId: int64, contentId: Content, capturePath: string, launchData: Dictionary) to (promptId: int64, contentId: Content, capturePath: string, launchData: string)
- 605 Add OpenSaveCapturesPrompt
- 605 Change Security of CaptureSaved from RobloxScriptSecurity to None
- 605 Add CaptureEnded
- 605 Add CaptureBegan
- 605 Change Parameters of PromptShareCapture from (contentId: Content, launchData: Dictionary, onAcceptedCallback: Function, onDeniedCallback: Function) to (contentId: Content, launchData: string, onAcceptedCallback: Function, onDeniedCallback: Function)
- 605 Add PromptSaveCapturesToGallery
- 605 Add OnSavePromptFinished
- 605 Add OnCaptureEnded
- 605 Add OnCaptureBegan
- 604 Add UserCaptureSaved
- 604 Add OpenShareCapturePrompt
- 604 Add PromptShareCapture
- 604 Add OnSharePromptFinished
- 603 Remove UserCaptureSaved
- 603 Remove OpenShareCapturePrompt
- 603 Remove PromptShareCapture
- 603 Remove OnSharePromptFinished
- 604 Add UserCaptureSaved
- 604 Add OpenShareCapturePrompt
- 604 Add PromptShareCapture
- 604 Add OnSharePromptFinished
- 601 Add SaveCaptureToExternalStorage
- 593 Add DeleteCapture
- 587 Add CaptureSaved
- 587 Add GetCaptureSizeAsync
- 583 Add RetrieveCaptures
- 583 Remove RetreiveCaptures
- 580 Add SaveScreenshotCapture
- 580 Add RetreiveCaptures
- 580 Add CaptureService
Members 28
CaptureBegan
Parameters (0) | ||
---|---|---|
No parameters. |
This event fires right before a new screenshot capture is taken. It can be used to customize the capture experience, for example by hiding certain GUI elements.
Thread safety | Unsafe |
---|
History 1
- 605 Add CaptureBegan
CaptureEnded
Parameters (0) | ||
---|---|---|
No parameters. |
This event fires after a new screenshot capture completes. It can be used to restore any changes made when the CaptureBegan event fired.
Thread safety | Unsafe |
---|
History 1
- 605 Add CaptureEnded
CaptureSaved
Parameters (1) | |
---|---|
captureInfo | Dictionary |
Thread safety | Unsafe |
---|
History 4
- 632 Change Tags of CaptureSaved from [] to [Deprecated]
- 632 Change PreferredDescriptor of CaptureSaved from to UserCaptureSaved
- 605 Change Security of CaptureSaved from RobloxScriptSecurity to None
- 587 Add CaptureSaved
CaptureSavedInternal
Parameters (2) | |
---|---|
captureInfo | Dictionary |
triggerSource | string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 626 Change Parameters of CaptureSavedInternal from (captureInfo: Dictionary) to (captureInfo: Dictionary, triggerSource: string)
- 621 Add CaptureSavedInternal
CaptureScreenshot
Parameters (1) | ||
---|---|---|
onCaptureReady | Function | |
Returns (1) | ||
null |
This method captures a screenshot for the user but does not immediately
save it to their Captures gallery within the experience's main menu.
Instead, a temporary contentId
is created to identify the new capture.
The onCaptureReady
callback can be used to prompt the user to save or
share the screenshot:
1 2 3 4 5 6 7 8 9 10 |
|
Thread safety | Unsafe |
---|
History 1
- 608 Add CaptureScreenshot
CreatePostAsync
Parameters (2) | ||
---|---|---|
pathArr | Array | |
caption | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 632 Add CreatePostAsync
DeleteCapture
Parameters (1) | ||
---|---|---|
capturePath | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 593 Add DeleteCapture
DeleteCapturesAsync
Parameters (1) | ||
---|---|---|
pathArr | Array | |
Returns (1) | ||
int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetCaptureFilePathAsync
Parameters (1) | ||
---|---|---|
captureContentId | ContentId | |
Returns (1) | ||
string |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 645 Change Parameters of GetCaptureFilePathAsync from (captureContentId: Content) to (captureContentId: ContentId)
- 610 Add GetCaptureFilePathAsync
GetCaptureSizeAsync
Parameters (1) | ||
---|---|---|
captureContentId | ContentId | |
Returns (1) | ||
Vector2 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 645 Change Parameters of GetCaptureSizeAsync from (captureContentId: Content) to (captureContentId: ContentId)
- 587 Add GetCaptureSizeAsync
GetCaptureStorageSizeAsync
Parameters (1) | ||
---|---|---|
pathArr | Array | |
Returns (1) | ||
int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
GetCaptureUploadDataAsync
Parameters (1) | ||
---|---|---|
capturePath | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
OnCaptureBegan
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 605 Add OnCaptureBegan
OnCaptureEnded
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 605 Add OnCaptureEnded
OnSavePromptFinished
Parameters (2) | ||
---|---|---|
promptId | int64 | |
results | Dictionary | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
OpenSaveCapturesPrompt
Parameters (2) | |
---|---|
promptId | int64 |
contentIds | Array |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
PromptSaveCapturesToGallery
Parameters (2) | ||
---|---|---|
contentIds | Array | |
resultCallback | Function | |
Returns (1) | ||
null |
This method prompts the user to save the screenshots identified by the
provided contentIds
to their Captures gallery within the
experience's main menu.
Thread safety | Unsafe |
---|
History 1
RetrieveCaptures
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Array |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
- 583 Add RetrieveCaptures
SaveCaptureToExternalStorage
Parameters (1) | ||
---|---|---|
capturePath | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
SaveCapturesToExternalStorageAsync
Parameters (1) | ||
---|---|---|
pathArr | Array | |
Returns (1) | ||
int64 |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 1
SaveScreenshotCapture
Parameters (1) | Default | |
---|---|---|
additionalInfo | string | |
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 645 Change Parameters of SaveScreenshotCapture from () to (additionalInfo: string = )
- 580 Add SaveScreenshotCapture
UserCaptureSaved
Parameters (1) | |
---|---|
captureContentId | ContentId |
This event fires when the user saves a screenshot using the Roblox screenshot capture UI. It can be used for analytics or to prompt the user to share their capture.
Thread safety | Unsafe |
---|
History 4
- 645 Change Parameters of UserCaptureSaved from (captureContentId: Content) to (captureContentId: ContentId)
- 604 Add UserCaptureSaved
- 603 Remove UserCaptureSaved
- 604 Add UserCaptureSaved
Removed members 2
PostToFeedAsync
Parameters (2) | ||
---|---|---|
capturePath | string | |
feedCategory | string | |
Returns (1) | ||
Dictionary |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 651 Remove PostToFeedAsync
- 644 Add PostToFeedAsync
RetreiveCaptures
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Array |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 583 Remove RetreiveCaptures
- 580 Add RetreiveCaptures