q5play
    Preparing search index...

    Function createRecorder

    • 🎞 Creates a recorder. Simply hit record to start recording!

      The following properties can be set via the recorder UI or programmatically.

      • format is set to "H.264" by default.
      • bitrate is a number in megabits per second (mbps). Its default value is determined by the height of the canvas. Increasing the bitrate will increase the quality and file size of the recording.
      • captureAudio is set to true by default. Set to false to disable audio recording.

      Note that recordings are done at a variable frame rate (VFR), which makes the output video incompatible with some editing software. For more info, see the "Recording the Canvas". wiki page.

      Returns HTMLElement

      a recorder, q5 DOM element

      await Canvas(200);

      let rec = createRecorder();
      rec.bitrate = 10;

      q5.draw = function () {
      circle(mouseX, jit(halfHeight), 10);
      };