open-audiovisual
Search GitHub

oav-p5 reference · Loading options

title#

optionoav-p5
?oav_title=a name

A name that goes into the file name of recordings and images, as in oav-my-piece-20261015-183012.mp4.

Without it a recording is oav-20261015-183012.mp4. With title: 'my-piece' it is oav-my-piece-20261015-183012.mp4, so takes from several pieces sort themselves. One take can have its own name: startRecording({ name: 'take-2' }) replaces it.

Type
String
Values
a name
default
'' (no name)

Spaces and the characters a file name cannot hold become -, and only the first 40 characters are used.

Notes

  • Set it before oav-p5 loads. window.OAV_P5 = { title: … }; above the loader line wins, then ?oav_title=… on the page address, then ?title=… on the script's own URL. Values in window.OAV_P5 are turned into text, so write 'off', not false. On OpenProcessing the page address takes ?sketch_oav_title=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { title: 'my-piece' };

let saved = 'press r to record 2 seconds';

function setup() {
  createCanvas(400, 300);
}

function keyPressed() {
  if (key === 'r') startRecording(2);
}

function recordingSaved(info) {
  saved = 'saved as ' + info.name;
}

function draw() {
  background(20);
  fill(255);
  text(saved, 20, 30);
}
Press r: two seconds are recorded and downloaded, and the sketch shows the file name, which starts with oav-my-piece-.

Related

  • startRecording() Records the canvas and the sound your sketch makes into one video file, and returns a promise that says whether the recording began.
  • recordingSaved() An event you define: it is called when a recording has been saved and checked, with an info object about the file.
  • record Whether recording is available and whether it includes the microphone: on, nomic or off.

p5/oav-p5.js, line 133

↑ Back to top · All names