# cp.apple.finalcutpro.main.Playhead

Playhead Module.


# API Overview

Functions - API calls offered directly by the extension

  • find
  • matches

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

  • Playhead

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

  • center
  • currentViewer
  • frame
  • isPersistent
  • position
  • timecode

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

  • hide
  • show

# API Documentation

# Functions

# find

Signature cp.apple.finalcutpro.main.Playhead.find(containerUI, skimming) -> hs.axuielement object | nil
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.axuielement object or nil if not found.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 30

# 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
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 17

# Constructors

# Playhead

Signature cp.apple.finalcutpro.main.Playhead(parent[, skimming[, containerFn[, useEventViewer]]]) -> 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.
  • 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.
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 64

# Fields

# center

Signature cp.apple.finalcutpro.main.Playhead.center <cp.prop: hs.geometry.point; read-only; live?>
Type Field
Description Gets the centre point ({x, y}) of the playhead.
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 126

# currentViewer

Signature cp.apple.finalcutpro.main.Playhead.currentViewer <cp.prop: cp.apple.finalcutpro.viewer.Viewer; read-only; live>
Type Field
Description Represents the current viewer for the playhead. This may be either the primary Viewer or the Event Viewer,
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 136

# frame

Signature cp.apple.finalcutpro.main.Playhead.frame <cp.prop: hs.geometry.frame; read-only; live?>
Type Field
Description Gets the frame of the playhead.
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 106

# isPersistent

Signature cp.apple.finalcutpro.main.Playhead.isPersistent <cp.prop: boolean; read-only>
Type Field
Description Is the playhead persistent?
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 99

# position

Signature cp.apple.finalcutpro.main.Playhead.position <cp.prop; number; read-only; live?>
Type Field
Description Gets the horizontal position of the playhead line, which may be different to the x position of the playhead.
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 116

# timecode

Signature cp.apple.finalcutpro.main.Playhead.timecode <cp.prop: string; live?>
Type Field
Description Gets and sets the current timecode.
Notes None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 154

# Methods

# hide

Signature cp.apple.finalcutpro.main.Playhead:hide() -> Playhead object
Type Method
Description Hides the Playhead
Parameters
  • None
Returns
  • Playhead object
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 216

# show

Signature cp.apple.finalcutpro.main.Playhead:show() -> Playhead object
Type Method
Description Shows the Playhead
Parameters
  • None
Returns
  • Playhead object
Notes None
Examples None
Source src/extensions/cp/apple/finalcutpro/main/Playhead.lua line 180