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 inwindow.OAV_P5are turned into text, so write'off', notfalse. On OpenProcessing the page address takes?sketch_oav_title=…(the project's README says OpenProcessing forwards it to the sketch).
Examples
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);
}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 aninfoobject about the file.recordWhether recording is available and whether it includes the microphone:on,nomicoroff.