MCPcopy Index your code
hub / github.com/processing/p5.js / time

Method time

src/dom/p5.MediaElement.js:667–672  ·  view source on GitHub ↗

* Sets the media element's playback time. * * The parameter, `time`, is optional. It's a number that specifies the * time, in seconds, to jump to when playback begins. * * Calling `media.time()` without an argument returns the number of seconds * the audio/video has played. *

(val)

Source from the content-addressed store, hash-verified

665 * }
666 */
667 time(val) {
668 if (typeof val !== 'undefined') {
669 this.elt.currentTime = val;
670 }
671 return this.elt.currentTime;
672 }
673
674 /**
675 * Returns the audio/video's duration in seconds.

Callers 4

_onTimeUpdateMethod · 0.95
scrubFunction · 0.80
drawFunction · 0.80
_shouldUpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected