Skip to content

Latest commit

 

History

History
211 lines (140 loc) · 4.91 KB

Timeline.md

File metadata and controls

211 lines (140 loc) · 4.91 KB

Timeline class

Timeline Instance Methods

Timeline Instance Methods

Timeline.prototype.getTimeScale()

Get time scale.

Returns

(Integer): time scale


Timeline.prototype.getFrameCount()

Get timeline duration expressed in frames.

Returns

(Integer): number of frames


Timeline.prototype.getTvBySec(seconds)

Get time value corresponding to time in seconds.

Arguments

  1. seconds (Number): time in seconds

Returns

(Integer): time value


Timeline.prototype.getLastFrame()

Get the last frame number on the timeline.

Returns

(Integer): frame number


Timeline.prototype.getLastTv()

Get the last frame time value.

Returns

(Integer): time value


Timeline.prototype.getTvByTimecode(timecode)

Get time value corresponding to the tape timecode in timecode.

Arguments

  1. timecode (String): tape timecode

Returns

(Integer): time value


Timeline.prototype.getTvByFrame(frame)

Get time value corresponding to the frame number in frame.

Arguments

  1. frame (Integer): frame number

Returns

(Integer): time value


Timeline.prototype.getFrameByTv(tv)

Get the frame number corresponding to the time value in tv.

Arguments

  1. tv (Integer): time value

Returns

(Integer): frame number


Timeline.prototype.getFrameBySec(seconds)

Get the frame number corresponding to the time in seconds.

Arguments

  1. seconds (Number): time in seconds

Returns

(Integer): frame number


Timeline.prototype.getFrameByTimecode(timecode)

Get the frame number corresponding to the tape timecode in timecode.

Arguments

  1. timecode (String): tape timecode

Returns

(Integer): frame number


Timeline.prototype.getFrameBySec(millis)

Get the frame number corresponding to milliseconds in millis.

Arguments

  1. millis (Integer): time in milliseconds

Returns

(Integer): frame number


Timeline.prototype.floorTv(tv)

Get time value aligned to the beginning of the frame.

Arguments

  1. tv (Integer): time value

Returns

(Integer): time value


Timeline.prototype.boundsFn(frame)

Clip frame number. Returns max(0, min(frame, lastFrame)).

Arguments

  1. frame (Integer): frame number

Returns

(Integer): frame number that is within [0, lastFrame]


Timeline.prototype.getSecByFrame(frame)

Get time in seconds corresponding to the frame number in frame.

Arguments

  1. frame (Integer): frame number

Returns

(Number): time in seconds


Timeline.prototype.getSecByTv(tv)

Get time in seconds corresponding to time value in tv.

Arguments

  1. tv (Integer): time value

Returns

(Number): time in seconds


Timeline.prototype.getMillisByTv(tv)

Get time in milliseconds corresponding to time value in tv.

Arguments

  1. tv (Integer): time value

Returns

(Number): time in milliseconds


Timeline.prototype.getDurationSec()

Get total duration of the video.

Returns

(Number): time in seconds


Timeline.prototype.getSeekableDurationSec()

Get duration which is seekable via player.seekSec

Returns

(Number): time in seconds