Skip to content

openrv-web / LoopAPI

Class: LoopAPI

Defined in: api/LoopAPI.ts:13

Constructors

Constructor

new LoopAPI(session): LoopAPI

Defined in: api/LoopAPI.ts:16

Parameters

session

Session

Returns

LoopAPI

Methods

clearInOut()

clearInOut(): void

Defined in: api/LoopAPI.ts:125

Clear in/out points, resetting the playback range to the full source duration.

Returns

void

Example

ts
openrv.loop.clearInOut();

getInPoint()

getInPoint(): number

Defined in: api/LoopAPI.ts:99

Get the current in point frame number.

Returns

number

The in point frame number (1-based).

Example

ts
const inPt = openrv.loop.getInPoint();

getMode()

getMode(): string

Defined in: api/LoopAPI.ts:49

Get the current loop mode.

Returns

string

The current loop mode: 'once', 'loop', or 'pingpong'.

Example

ts
const mode = openrv.loop.getMode(); // e.g. 'loop'

getOutPoint()

getOutPoint(): number

Defined in: api/LoopAPI.ts:113

Get the current out point frame number.

Returns

number

The out point frame number (1-based).

Example

ts
const outPt = openrv.loop.getOutPoint();

setInPoint()

setInPoint(frame): void

Defined in: api/LoopAPI.ts:64

Set the in point (start of playback range).

Parameters

frame

number

Frame number for the in point (1-based).

Returns

void

Throws

If frame is not a valid number or is NaN.

Example

ts
openrv.loop.setInPoint(10);

setMode()

setMode(mode): void

Defined in: api/LoopAPI.ts:32

Set the loop mode for playback.

Parameters

mode

string

One of 'once' (play once and stop), 'loop' (repeat from start), or 'pingpong' (alternate forward/backward).

Returns

void

Throws

If mode is not a recognized loop mode string.

Example

ts
openrv.loop.setMode('loop');

setOutPoint()

setOutPoint(frame): void

Defined in: api/LoopAPI.ts:82

Set the out point (end of playback range).

Parameters

frame

number

Frame number for the out point (1-based).

Returns

void

Throws

If frame is not a valid number or is NaN.

Example

ts
openrv.loop.setOutPoint(200);

Released under the MIT License.