open-audiovisual
Search GitHub

oav-p5 reference · Loading options

remote#

optionoav-p5
?oav_remote=an https:// address

The address of the remote page that the 📱 QR code opens on a phone.

The phone's page is where the on-screen controller on the phone lives. The QR code and the link under it are this address plus the relay, the room and the MIDI tab. Change it when you host the remote page yourself, for example on a local network where the phone cannot reach the public site.

Type
String (URL)
Values
an https:// address
default
https://openaudiovisual.com/packages/remote/

Used as given, with ?relay=…&room=…&tab=midi added.

Notes

  • Set it before oav-p5 loads. window.OAV_P5 = { remote: … }; above the loader line wins, then ?oav_remote=… on the page address, then ?remote=… 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_remote=… (the project's README says OpenProcessing forwards it to the sketch).

Examples

jsOpenProcessing ↗
window.OAV_P5 = { remote: 'http://192.168.0.10:8080/packages/remote/' };

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

function draw() {
  background(20);
  fill(255);
  text('remote page: ' + OAVp5.options.remote, 20, 30);   // the 📱 QR code points here
}
The sketch prints the remote page address in use. Press 🎹, then 📱: the QR code and the link under it point at that address.

Related

  • relay The address of the relay that phones and link rooms talk through: a WebSocket URL.
  • room The name of the room phones join to play this page: by default one made up per browser.
  • OAVp5.phone() Shows the 📱 card: a QR code that sends a phone to the remote page, whose MIDI tab then plays this sketch. Returns the room name.

p5/oav-p5.js, line 129

↑ Back to top · All names