#cp.apple.finalcutpro.main.Playhead

Playhead Module.


#API Overview

Functions - API calls offered directly by the extension

Constructors - API calls which return an object, typically one that offers API methods

Fields - Variables which can only be accessed from an object returned by a constructor

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Functions

Signaturecp.apple.finalcutpro.main.Playhead.find(containerUI, skimming) -> hs.axuielement object | nil
TypeFunction
DescriptionFinds 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.axuielement object or nil if not found.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 30

Signaturecp.apple.finalcutpro.main.Playhead.matches(element) -> boolean
TypeFunction
DescriptionChecks 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
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 17

#Constructors

Signaturecp.apple.finalcutpro.main.Playhead(parent[, skimming[, containerFn[, useEventViewer]]]) -> Playhead
TypeConstructor
DescriptionConstructs a new Playhead
Parameters
  • parent - The parent object
  • skimming - (optional) if true, this links to the 'skimming' playhead created under the mouse, if present.
  • containerUI - (optional) a cp.prop which returns the container axuielement which contains the playheads. If not present, it will use the parent's UI element.
  • useEventViewer - (optional) if true, this will use the Event Viewer's timecode, when available.
Returns
  • The new Playhead instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 64

#Fields

Signaturecp.apple.finalcutpro.main.Playhead.center <cp.prop: hs.geometry.point; read-only; live?>
TypeField
DescriptionGets the centre point ({x, y}) of the playhead.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 126

Signaturecp.apple.finalcutpro.main.Playhead.currentViewer <cp.prop: cp.apple.finalcutpro.viewer.Viewer; read-only; live>
TypeField
DescriptionRepresents the current viewer for the playhead. This may be either the primary Viewer or the Event Viewer,
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 136

Signaturecp.apple.finalcutpro.main.Playhead.frame <cp.prop: hs.geometry.frame; read-only; live?>
TypeField
DescriptionGets the frame of the playhead.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 106

Signaturecp.apple.finalcutpro.main.Playhead.isPersistent <cp.prop: boolean; read-only>
TypeField
DescriptionIs the playhead persistent?
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 99

Signaturecp.apple.finalcutpro.main.Playhead.position <cp.prop; number; read-only; live?>
TypeField
DescriptionGets the horizontal position of the playhead line, which may be different to the x position of the playhead.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 116

Signaturecp.apple.finalcutpro.main.Playhead.timecode <cp.prop: string; live?>
TypeField
DescriptionGets and sets the current timecode.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 154

#Methods

Signaturecp.apple.finalcutpro.main.Playhead:hide() -> Playhead object
TypeMethod
DescriptionHides the Playhead
Parameters
  • None
Returns
  • Playhead object
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 216

Signaturecp.apple.finalcutpro.main.Playhead:show() -> Playhead object
TypeMethod
DescriptionShows the Playhead
Parameters
  • None
Returns
  • Playhead object
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/main/Playhead.lua line 180