docs » cp.apple.finalcutpro.main.Playhead


Playhead Module.

API Overview

API Documentation

Functions

find

Signature `cp.apple.finalcutpro.main.Playhead.find(containerUI, skimming) -> hs._asm.axuielement object nil` </span>
Type Function
Description Finds the playhead (either persistent or skimming) in the specified container. Defaults to persistent.
Parameters
  • `containerUI` - The container UI
  • `skimming` - Whether or not you want the skimming playhead as boolean.
Returns
  • The playhead `hs._asm.axuielement` object or `nil` if not found.

matches

Signature cp.apple.finalcutpro.main.Playhead.matches(element) -> boolean
Type Function
Description Checks to see if a GUI element is the Playhead or not
Parameters
  • `element` - The element you want to check
Returns
  • `true` if the `element` is the Playhead otherwise `false`

Constructors

new

Signature cp.apple.finalcutpro.main.Playhead:new(parent, skimming, containerFn) -> Playhead
Type Constructor
Description Constructs a new Playhead
Parameters
  • * parent - The parent object
  • * skimming - (optional) if `true`, this links to the 'skimming' playhead created under the mouse, if present.
  • * containerFn - (optional) a function which returns the container axuielement which contains the playheads. If not present, it will use the parent's UI element.
Returns
  • * The new `Playhead` instance.

Fields

isPersistent

Signature cp.apple.finalcutpro.main.Playhead.isPersistent <cp.prop: boolean>
Type Field
Description Is the playhead persistent?

isShowing

Signature cp.apple.finalcutpro.main.Playhead.isShowing <cp.prop: boolean>
Type Field
Description Is the playhead showing?

isSkimming

Signature cp.apple.finalcutpro.main.Playhead.isSkimming <cp.prop: boolean>
Type Field
Description Is the playhead skimming?

Methods

app

Signature cp.apple.finalcutpro.main.Playhead:app() -> table
Type Method
Description Returns the cp.apple.finalcutpro app table
Parameters
  • None
Returns
  • The application object as a table

getCenter

Signature cp.apple.finalcutpro.main.Playhead:getCenter() -> hs.geometry.point
Type Method
Description Gets the centre of the playhead.
Parameters
  • None
Returns
  • The playhead centre position as a `hs.geometry.point`.

getFrame

Signature cp.apple.finalcutpro.main.Playhead:getFrame() -> hs.geometry.frame
Type Method
Description Gets the frame of the playhead.
Parameters
  • None
Returns
  • The playhead frame.

getPosition

Signature cp.apple.finalcutpro.main.Playhead:getPosition() -> number
Type Method
Description Gets the position of the playhead.
Parameters
  • None
Returns
  • The playhead position as a number.

getTimecode

Signature cp.apple.finalcutpro.main.Playhead:getTimecode() -> string
Type Method
Description Gets the timecode of the current playhead position.
Parameters
  • None
Returns
  • Timecode value as string.

getX

Signature cp.apple.finalcutpro.main.Playhead:getX() -> number
Type Method
Description Gets the x position of the playhead.
Parameters
  • None
Returns
  • `x` position as number.

hide

Signature cp.apple.finalcutpro.main.Playhead:hide() -> Playhead object
Type Method
Description Hides the Playhead
Parameters
  • None
Returns
  • Playhead object

parent

Signature cp.apple.finalcutpro.main.Playhead:parent() -> table
Type Method
Description Returns the Playhead's parent table
Parameters
  • None
Returns
  • The parent object as a table

setTimecode

Signature `cp.apple.finalcutpro.main.Playhead:setTimecode(timecode) -> Playhead object nil` </span>
Type Method
Description Moves the playhead to a specific timecode value.
Parameters
  • timecode - The timecode value you want to move to as a string in the following format: "hh:mm:ss:ff" (i.e. "01:00:00:00").
Returns
  • Playhead object is successful otherwise `nil`

show

Signature cp.apple.finalcutpro.main.Playhead:show() -> Playhead object
Type Method
Description Shows the Playhead
Parameters
  • None
Returns
  • Playhead object

UI

Signature cp.apple.finalcutpro.main.Playhead:UI() -> hs._asm.axuielement object
Type Method
Description Returns the hs._asm.axuielement object for the Playhead
Parameters
  • None
Returns
  • A `hs._asm.axuielement` object

results matching ""

    No results matching ""