mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 22:11:38 +00:00
104 lines
3.1 KiB
YAML
104 lines
3.1 KiB
YAML
# 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: VideoSampler
|
|
type: class
|
|
memory_category: Instances
|
|
summary: |
|
|
An object for sampling frames from video content.
|
|
description: |
|
|
This object lets you get image frames from selected timestamps of a video. To
|
|
create a `Class.VideoSampler`, call
|
|
`Class.VideoService:CreateVideoSamplerAsync()`.
|
|
code_samples: []
|
|
inherits:
|
|
- Object
|
|
descendants: []
|
|
tags:
|
|
- NotCreatable
|
|
deprecation_message: ''
|
|
properties:
|
|
- name: VideoSampler.TimeLength
|
|
summary: |
|
|
The length of the `Class.VideoSampler.VideoContent|VideoContent` in
|
|
seconds.
|
|
description: |
|
|
The length of the `Class.VideoSampler.VideoContent|VideoContent` in
|
|
seconds.
|
|
code_samples: []
|
|
type: double
|
|
tags:
|
|
- ReadOnly
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Data
|
|
serialization:
|
|
can_load: false
|
|
can_save: true
|
|
capabilities: []
|
|
- name: VideoSampler.VideoContent
|
|
summary: |
|
|
The asset loaded into the `Class.VideoSampler`.
|
|
description: |
|
|
The asset loaded into the `Class.VideoSampler`.
|
|
code_samples: []
|
|
type: Content
|
|
tags:
|
|
- ReadOnly
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Data
|
|
serialization:
|
|
can_load: false
|
|
can_save: true
|
|
capabilities: []
|
|
methods:
|
|
- name: VideoSampler:GetSamplesAtTimesAsync
|
|
summary: |
|
|
Gets image frames at the specified timestamps.
|
|
description: |
|
|
This method allows you to get a set of image frames from a video at
|
|
specified timestamps as image `Datatype.Content` objects.
|
|
code_samples: []
|
|
parameters:
|
|
- name: times
|
|
type: Array
|
|
default:
|
|
summary: |
|
|
An array of requested timestamps in seconds for which to retrieve
|
|
image frames. Each timestamp should be a number between `0` and
|
|
`Class.VideoSampler.TimeLength|TimeLength`.
|
|
returns:
|
|
- type: Array
|
|
summary: |
|
|
An array of dictionary or nil values for each requested timestamp. If
|
|
a requested timestamp is out of range or the `Class.VideoSampler` was
|
|
unable to produce a sample, the corresponding entry in the returned
|
|
array will be nil.
|
|
|
|
Each dictionary contains the following keys:
|
|
|
|
- `Time` (number): The timestamp of the returned image frame in
|
|
seconds. This value may differ slightly from the requested
|
|
timestamp.
|
|
- `Image` (`Datatype.Content`): A `Datatype.Content` with a
|
|
`Datatype.Content.SourceType|SourceType` of
|
|
`Enum.ContentSourceType.Opaque` containing the image frame at the
|
|
corresponding timestamp.
|
|
tags:
|
|
- Yields
|
|
deprecation_message: ''
|
|
security: None
|
|
thread_safety: Unsafe
|
|
capabilities: []
|
|
events: []
|
|
callbacks: []
|