Skip to content

Instantly share code, notes, and snippets.

@secretrobotron
Created May 7, 2012 20:23
Show Gist options
  • Save secretrobotron/2630165 to your computer and use it in GitHub Desktop.
Save secretrobotron/2630165 to your computer and use it in GitHub Desktop.
TrackEvent documentation

Module: TrackEvent

Supports a single event in the Media > Track > TrackEvent model.

Class: TrackEvent

Represents and governs a single popcorn event.

  • param options : Options for initialization. Can contain the properties type, name, and popcornOptions. If the popcornOptions property is specified, its contents will be used to initialize the plugin instance associated with this TrackEvent.

Usage: TrackEvent(options)

Member: update

Updates the event properties and runs sanity checks on input.

  • param updateOptions : Object containing plugin-specific properties to be updated for this TrackEvent.
  • event trackeventupdatefailed : Occurs when an update operation failed because of conflicting times or other serious property problems. As the data property on this event is a string which represents the reason for failure.
  • event trackeventupdated : Occurs whenan update operation succeeded.

Usage: update(updateOptions, trackeventupdatefailed, trackeventupdated)

Member: moveFrameLeft

Moves the event to the left, or shrinks it by a specified amount.

  • param inc : Amount by which the event is to move or grow.
  • param metaKey : State of the metaKey (windows, command, etc.). When true, the event duration is shortened.
  • event trackeventupdated : Occurs whenan update operation succeeded.

Usage: moveFrameLeft(inc, metaKey, trackeventupdated)

Member: moveFrameRight

Moves the event to the right, or elongates it by a specified amount.

  • param inc : Amount by which the event is to move or grow.
  • param metaKey : State of the metaKey (windows, command, etc.). When true, the event duration is lengthened.
  • event trackeventupdated : Occurs whenan update operation succeeded.

Usage: moveFrameRight(inc, metaKey, trackeventupdated)

Property: _track

Specifies the track on which this TrackEvent currently sites. When set, an update occurs.

Property: view

A reference to the view object generated for this TrackEvent.

Property: type

The type representing the popcorn plugin created and manipulated by this TrackEvent.

Property: name

Name of this TrackEvent.

Property: id

Name of this TrackEvent.

Property: selected

Specifies the state of selection. When true, this TrackEvent is selected.

Property: json

Represents this TrackEvent in a portable JSON format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment