Class PAGPlayer

Hierarchy

  • PAGPlayer

Methods

  • Set the progress of play position, the value is from 0.0 to 1.0.

    Parameters

    • progress: number

    Returns void

  • Apply all pending changes to the target surface immediately. Returns true if the content has changed.

    Returns Promise<boolean>

  • [Internal] Apply all pending changes to the target surface immediately. Returns true if the content has changed.

    Parameters

    • callback: ((res: boolean) => void)
        • (res: boolean): void
        • Parameters

          • res: boolean

          Returns void

    Returns Promise<boolean>

  • The duration of current composition in microseconds.

    Returns number

  • Returns the current progress of play position, the value is from 0.0 to 1.0.

    Returns number

  • If set to false, the player skips rendering for video composition.

    Returns boolean

  • Set the value of videoEnabled property.

    Parameters

    • enabled: boolean

    Returns void

  • If set to true, PAGPlayer caches an internal bitmap representation of the static content for each layer. This caching can increase performance for layers that contain complex vector content. The execution speed can be significantly faster depending on the complexity of the content, but it requires extra graphics memory. The default value is true.

    Returns boolean

  • Set the value of cacheEnabled property.

    Parameters

    • enabled: boolean

    Returns void

  • This value defines the scale factor for internal graphics caches, ranges from 0.0 to 1.0. The scale factors less than 1.0 may result in blurred output, but it can reduce the usage of graphics memory which leads to better performance. The default value is 1.0.

    Returns number

  • Set the value of cacheScale property.

    Parameters

    • value: number

    Returns void

  • The maximum frame rate for rendering, ranges from 1 to 60. If set to a value less than the actual frame rate from composition, it drops frames but increases performance. Otherwise, it has no effect. The default value is 60.

    Returns number

  • Set the maximum frame rate for rendering.

    Parameters

    • value: number

    Returns void

  • Specifies the rule of how to scale the pag content to fit the surface size. The matrix changes when this method is called.

    Parameters

    Returns void

  • Set the transformation which will be applied to the composition. The scaleMode property will be set to PAGScaleMode::None when this method is called.

    Parameters

    Returns void

  • Set the progress of play position to next frame. It is applied only when the composition is not null.

    Returns void

  • Set the progress of play position to previous frame. It is applied only when the composition is not null.

    Returns void

  • If true, PAGPlayer clears the whole content of PAGSurface before drawing anything new to it. The default value is true.

    Returns boolean

  • Sets the autoClear property.

    Parameters

    • value: boolean

    Returns void

  • Evaluates the PAGLayer to see if it overlaps or intersects with the specified point. The point

    is in the coordinate space of the PAGSurface, not the PAGComposition that contains the PAGLayer. It always returns false if the PAGLayer or its parent (or parent's parent...) has not been added to this PAGPlayer. The pixelHitTest parameter indicates whether or not to check against the actual pixels of the object (true) or the bounding box (false). Returns true if the PAGLayer overlaps or intersects with the specified point.

    Parameters

    • pagLayer: PAGLayer
    • surfaceX: number
    • surfaceY: number
    • pixelHitTest: boolean = false

    Returns boolean

  • The time cost by rendering in microseconds.

    Returns number

  • The time cost by image decoding in microseconds.

    Returns number

  • The time cost by presenting in microseconds.

    Returns number

  • The memory cost by graphics in bytes.

    Returns number

  • Prepares the player for the next flush() call. It collects all CPU tasks from the current progress of the composition and runs them asynchronously in parallel. It is usually used for speeding up the first frame rendering.

    Returns Promise<void>

Constructors

Properties

wasmIns: any
isDestroyed: boolean = false
videoReaders: VideoReader[] = []

Generated using TypeDoc