#cp.apple.finalcutpro.viewer.Viewer

Viewer Module.


#API Overview

Constants - Useful values which cannot be changed

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

#Constants

Signaturecp.apple.finalcutpro.viewer.Viewer.BACKGROUND -> table
TypeConstant
DescriptionLists the possible background values: BLACK, WHITE, CHECKERBOARD.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 472

Signaturecp.apple.finalcutpro.viewer.Viewer.PLAYBACK_MODE -> table
TypeConstant
DescriptionLists the possible playback modes for the viewer: ORIGINAL_BETTER_QUALITY, ORIGINAL_BETTER_PERFORMANCE, PROXY_PREFERRED, PROXY_ONLY.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 383

#Functions

Signaturecp.apple.finalcutpro.viewer.Viewer.matches(element) -> boolean
TypeFunction
DescriptionChecks to see if an element matches what we think it should be.
Parameters
  • element - An axuielementObject to check.
Returns
  • true if matches otherwise false
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 101

#Constructors

Signaturecp.apple.finalcutpro.viewer.Viewer(app, eventViewer) -> Viewer
TypeConstructor
DescriptionCreates a new Viewer instance.
Parameters
  • app - The FCP application.
  • eventViewer - If true, the viewer is the Event Viewer.
Returns
  • The new Viewer instance.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 121

#Fields

Signaturecp.apple.finalcutpro.viewer.Viewer.background -> <cp.prop: number, live?>
TypeField
DescriptionThe viewer background mode. See Viewer.BACKGROUND for options.
Notes
  • sets the background for all viewers.
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 481

| | | | --------------------------------------------|-------------------------------------------------------------------------------------| | Signature | cp.apple.finalcutpro.viewer.Viewer.betterQuality <cp.prop: boolean, read-only> | | Type | Field | | Description | Checks if the viewer is using playing with better quality (true) or performance (false). | | **Notes** | <ul><li>Use playbackMode` to change modes between original/proxy/quality/performance. | | Source | src/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 457 |


Signaturecp.apple.finalcutpro.viewer.Viewer.contentsUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionProvides the axuielement for the media contents of the Viewer, or nil if not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 252

Signaturecp.apple.finalcutpro.viewer.Viewer.controlBar <cp.apple.finalcutpro.viewer.ControlBar>
TypeField
DescriptionProvides the ControlBar for this Viewer.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 295

Signaturecp.apple.finalcutpro.viewer.Viewer.frame <cp.prop: table; read-only>
TypeField
DescriptionReturns the current frame for the viewer, or nil if it is not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 242

Signaturecp.apple.finalcutpro.viewer.Viewer.framerate <cp.prop: number; read-only>
TypeField
DescriptionProvides the framerate as a number, or nil if not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 498

Signaturecp.apple.finalcutpro.viewer.Viewer.getFormat <cp.prop: string; read-only>
TypeField
DescriptionProvides the format text value, or nil if none is available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 491

Signaturecp.apple.finalcutpro.viewer.Viewer.hasPlayerControls <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the viewer has Player Controls visible.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 318

Signaturecp.apple.finalcutpro.viewer.Viewer.infoBar <cp.apple.finalcutpro.viewer.InfoBar>
TypeField
DescriptionProvides the InfoBar for this Viewer.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 287

Signaturecp.apple.finalcutpro.viewer.Viewer.isEventViewer <cp.prop: boolean>
TypeField
DescriptionReturns true if this is the Event Viewer.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 518

Signaturecp.apple.finalcutpro.viewer.Viewer.isMainViewer <cp.prop: boolean>
TypeField
DescriptionReturns true if this is the main Viewer.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 511

Signaturecp.apple.finalcutpro.viewer.Viewer.isOnPrimary <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the Viewer is showing on the Primary Window.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 232

Signaturecp.apple.finalcutpro.viewer.Viewer.isOnSecondary <cp.prop: boolean; read-only>
TypeField
DescriptionChecks if the Viewer is showing on the Secondary Window.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 222

Signaturecp.apple.finalcutpro.viewer.Viewer.playbackMode -> Viewer.PLAYBACK_MODE
TypeField
DescriptionReports and allows modification of the current playback mode.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 393

Signaturecp.apple.finalcutpro.viewer.Viewer.playButton <cp.ui.Button>
TypeField
DescriptionThe Play Button object.
Parameters
  • None
Returns
  • A Button
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 713

Signaturecp.apple.finalcutpro.viewer.Viewer.timecode <cp.prop: string; live>
TypeField
DescriptionThe current timecode value, with the format "hh:mm:ss:ff". Setting also supports "hh:mm:ss;ff".
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 310

Signaturecp.apple.finalcutpro.viewer.Viewer.timecodeField <cp.ui.StaticText>
TypeField
DescriptionThe StaticText containing the timecode value.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 303

Signaturecp.apple.finalcutpro.viewer.Viewer.title <cp.ui.StaticText>
TypeField
DescriptionProvides the Title of the clip in the Viewer as a StaticText
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 325

Signaturecp.apple.finalcutpro.viewer.Viewer.usingProxies <cp.prop: boolean, read-only>
TypeField
DescriptionIndicates if the viewer is using Proxies (true) or Optimized/Original media (false).
Notes
  • Use playbackMode to change modes between original/proxy/quality/performance.
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 443

Signaturecp.apple.finalcutpro.viewer.Viewer.videoImage <cp.ui.Image>
TypeField
DescriptionThe Image for the video content.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 280

Signaturecp.apple.finalcutpro.viewer.Viewer.videoImageUI <cp.prop: hs.axuielement; read-only>
TypeField
DescriptionProvides the axuielement for video image within the Viewer, or nil if not available.
NotesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 267

#Methods

Signaturecp.apple.finalcutpro.viewer.Viewer:app() -> application
TypeMethod
DescriptionReturns the application.
Parameters
  • None
Returns
  • The application.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 209

Signaturecp.apple.finalcutpro.viewer.Viewer:currentWindow() -> PrimaryWindow | SecondaryWindow
TypeMethod
DescriptionGets the current window object.
Parameters
  • None
Returns
  • The PrimaryWindow or the SecondaryWindow.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 531

Signaturecp.apple.finalcutpro.viewer.Viewer:doHide() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that hides the Viewer.
Parameters
  • None
Returns
  • The Statement, resolving to true, or sends an error.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 684

Signaturecp.apple.finalcutpro.viewer.Viewer.doPause() -> cp.rx.go.Statement
TypeMethod
DescriptionPause the Viewer.
Parameters
  • None
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 359

Signaturecp.apple.finalcutpro.viewer.Viewer:doPlay() -> cp.rx.go.Statement
TypeMethod
DescriptionReturns a Statement that will play the Viewer.
Parameters
  • None
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 344

Signaturecp.apple.finalcutpro.viewer.Viewer:doShowOnPrimary() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that shows the Viewer on the Primary display.
Parameters
  • None
Returns
  • The Statement, which resolves to true, or sends an error message.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 578

Signaturecp.apple.finalcutpro.viewer.Viewer:doShowOnSecondary() -> cp.rx.go.Statement
TypeMethod
DescriptionA Statement that shows the Viewer on the Secondary display.
Parameters
  • None
Returns
  • The Statement, resolving to true, or sending an error message.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 630

Signaturecp.apple.finalcutpro.viewer.Viewer:hide() -> self
TypeMethod
DescriptionHides the Viewer.
Parameters
  • None
Returns
  • Self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 656

Signaturecp.apple.finalcutpro.viewer.Viewer:notifier() -> cp.ui.notifier
TypeMethod
DescriptionReturns a notifier that is tracking the application UI element. It has already been started.
Parameters
  • None
Returns
  • The notifier.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 726

Signaturecp.apple.finalcutpro.viewer.Viewer:showOnPrimary() -> self
TypeMethod
DescriptionShows the Viewer on the Primary display.
Parameters
  • None
Returns
  • Self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 548

Signaturecp.apple.finalcutpro.viewer.Viewer:showOnSecondary() -> self
TypeMethod
DescriptionShows the Viewer on the Seconary display.
Parameters
  • None
Returns
  • Self
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/apple/finalcutpro/viewer/Viewer.lua line 604