Skip to content
Roblox API Reference

VideoSampler

An object for sampling frames from video content.
  • Not creatable
  • Not replicated
Memory category
Instances
Own members
3
Inherited members
6
Subclasses
0
Siblings
30

Properties4

Inherited fromObject2

Property categoryData

Defined byVideoSampler2

Property categoryData

  • VideoSampler.TimeLength: number
    The length of the VideoContent in seconds.
    • Read only
    • Capabilities: UI
    • Save only
  • VideoSampler.VideoContent: Content
    The asset loaded into the VideoSampler.
    • Read only
    • Capabilities: UI
    • Save only

Methods4

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Defined byVideoSampler1
  • VideoSampler:GetSamplesAtTimesAsync(times: { any }): { any }
    Gets image frames at the specified timestamps.
    • Yields
    • Capabilities: UI
    Parameters
    ParameterDescription
    times: { any }
    An array of requested timestamps in seconds for which to retrieve image frames. Each timestamp should be a number between 0 and TimeLength.
    Returns
    TypeDescription
    { any }
    An array of dictionary or nil values for each requested timestamp. If a requested timestamp is out of range or the 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 (Content): A Content with a SourceType of ContentSourceType.Opaque containing the image frame at the corresponding timestamp.

Events1

Inherited fromObject1