looper

The looper plugin allows you to push a looping Node to the playlist.

This plugin does not auto initialize and should be initialized manually

Properties

player.looper.version : string
propertyreadonly

The looper plugin’s version string.

Example

console.log('The looper plugin version is', player.looper.version);

Methods

player.looper.push()
method

Push a looping node (or nodes) to the playlist.
Any nodes pushed to the playlist following a call to looper.push() will be queued and pushed only after looper.finish is called.

Param Type Description
…node string | Node The node id (or node object) to push to playlist and loop.

Example

// Will play loop1 => loop2 => loop1 => ...
player.looper.push('loop1', 'loop2');
// Will not actually be pushed to playlist until player.looper.finish() is called.
player.playlist.push('someOtherNode');

player.looper.finish(options)
method

Finish (stop) an ongoing loop (do not push more instances of the loop into the playlist).
Any queued nodes (pushed while looping), will be pushed to playlist after finish() executes.

Param Type Description
options object An options object which accepts the following params:
options.seek boolean If true, will immediately seek to post-loop node (if exists).
options.ignoreAppendQueue boolean If true, all player.playlist.push and player.append calls that were made after the call to looper.push will be ignored.

Example

player.looper.push('myLoopingNode');
// Will not actually be pushed to playlist until player.looper.finish() is called.
player.append('someOtherNode');
// Will finish the loop, and immediately seek to next post-loop node in playlist ('someOtherNode').
player.looper.finish({seek: true});
Rate this page: X
Tell us more!