MCPcopy
hub / github.com/processing/p5.js / loop

Method loop

src/dom/p5.MediaElement.js:299–303  ·  view source on GitHub ↗

* Plays the audio/video repeatedly in a loop. * * @chainable * * @example * let beat; * let isLooping = false; * * function setup() { * createCanvas(100, 100); * * background(200); * * // Create a p5.MediaElement using createAudio(). * beat = createA

()

Source from the content-addressed store, hash-verified

297 * }
298 */
299 loop() {
300 this.elt.setAttribute('loop', true);
301 this.play();
302 return this;
303 }
304 /**
305 * Stops the audio/video from playing in a loop.
306 *

Callers 15

setupFunction · 0.80
setupFunction · 0.80
toggleVidFunction · 0.80
setupFunction · 0.80
setupFunction · 0.80
toggleVidFunction · 0.80
sketch0Function · 0.80
mouseClickedFunction · 0.80
keyPressedFunction · 0.80
keyPressedFunction · 0.80
setupFunction · 0.80
setupFunction · 0.80

Calls 2

playMethod · 0.95
setAttributeMethod · 0.80

Tested by

no test coverage detected