Black Friday: DSLR Remote Pro $299, Breeze Booth $399 a year, 20% off more

See the deals
Breeze Help Center

How Widgets Work

Developer reference for HTML Widgets in Remote Pro: the window.bb API, reading and writing tokens, triggering touchscreen actions, panel behaviour and debugging.

Updated 23 Nov 2026

Widgets let you put your own HTML inside a Remote Pro photo booth screen, such as a game, a form, a quiz or a custom overlay, and exchange data with the rest of the app. This page is for the person writing the HTML. For turning the feature on and positioning it, see Widgets. For a shorter overview, see HTML/Javascript Widgets.

Remote Pro shows your page in a Web View Panel (a Microsoft Edge WebView2 control) and builds the connection to the page for you. You don't need to register anything.

The API is deliberately the same as Breeze Booth for iPad, so most widgets run in both apps. Breeze Booth action names are accepted in Remote Pro (see Breeze Booth action names). See the Breeze Booth Widgets guide for the iPad side.


The window.bb API#

When Remote Pro loads your HTML in the panel, it adds a window.bb object before any of your scripts run.

API Direction Purpose
window.bb.tokens Remote Pro → page A read-only snapshot of the {curly} tokens.
window.bb.setToken(key, value) page → Remote Pro Saves a value back to Remote Pro as {<id>_<key>}.
window.bb.runAction(name) page → Remote Pro Runs a touchscreen action by its caption, e.g. Start photobooth.
window.bb.actionId Remote Pro → page The panel's Token ID setting.
window.bb.close() page → Remote Pro Hides the Web View Panel (Remote Pro only).

window.bb does not exist when you open the file in a normal browser for design or preview work. Always check for it before calling it. The helpers below do this for you.

Recommended helpers#

Paste these at the top of your script and use them everywhere. They are identical to the Breeze Booth versions.

function bbGet(key, fallback) {
  if (window.bb && window.bb.tokens && Object.prototype.hasOwnProperty.call(window.bb.tokens, key)) {
    const v = window.bb.tokens[key];
    return (v === '' || v == null) ? fallback : v;
  }
  return fallback;
}
function bbSet(key, value) {
  if (window.bb && typeof window.bb.setToken === 'function') {
    window.bb.setToken(key, String(value));
  }
}
function bbRun(actionName) {
  if (window.bb && typeof window.bb.runAction === 'function') {
    window.bb.runAction(actionName);
  }
}

Outside Remote Pro, bbGet returns the fallback you pass in and bbSet / bbRun do nothing, so the page still works in a desktop browser while you work on layout and styling.


Reading tokens#

window.bb.tokens is a plain object. Its keys include the curly braces, exactly as they appear in Remote Pro's Tokens.

const event = bbGet('{eventName}', '');
const input = bbGet('{user_data}', '');   // touchscreen keyboard input
const qr    = bbGet('{qr1}', '');         // first scanned QR code

The snapshot includes everything Remote Pro's own substitutions can see, including:

  • {eventName}, {eventDate}, {eventId}, {eventString1}–{eventString5} and the {eventKite*} tokens
  • {computerName}, {printTemplateName}, {eventPrintCounter}, {eventPrintTotal}
  • Keyboard input: {user_data} and {user<N>_data}, plus survey tags
  • QR codes: {qr1}–{qr30}
  • {PhotoboothText1}–{PhotoboothText5}
  • Values already saved by a widget with setToken ({<id>_<key>})
  • The % date and time tokens (%Y, %m, %D, %t and so on)

Tokens are a snapshot#

The token values are captured when the panel is shown or loads a page. They don't update while the page stays loaded. Read any value you need once when the page starts. Reloading the page picks up the snapshot from the last time the panel was shown.


Saving tokens#

Values you save from the page appear in Remote Pro as {<tokenId>_<key>}, where <tokenId> is the Token ID setting of the Web View Panel. If the Token ID is blank, webview is used.

// With Token ID = "soccer"
bbSet('score', 7);          // → {soccer_score} = "7"
bbSet('streak', 3);         // → {soccer_streak} = "3"
bbSet('player', 'Alice');   // → {soccer_player} = "Alice"

Saved values are available everywhere a {token} works: filename templates, email and SMS text, print layout text, captions, overlay text, sharing URLs, the Status URL and more.

How saved values behave#

Overwriting. Saving the same key again replaces the old value. There's no append; your page owns its own keys.

Everything is text. Numbers, true/false and other values are converted to text. null and undefined become an empty string.

Key names. Keys become part of a token name, so Remote Pro cleans them up:

  • Any character other than A–Z a–z 0–9 _ - is replaced with _.
  • Keys are limited to 64 characters.
  • An empty or unusable key is ignored and logged as DIAG-WebViewBB: setToken ignored.

Lifetime. Saved values are cleared at the start of each photo booth session, at the same time as QR codes and session IDs. That suits "use this value in the email being sent now". To remember something across sessions, such as a high score, you need to store it somewhere else.


Running touchscreen actions#

You can run any touchscreen action by the caption shown in the touchscreen editor. These are the same names used by the Status URL ts command.

Action caption What it does
Start photobooth Starts a capture (countdown and photos).
Photo start / Video/GIF start Starts in a specific mode.
Switch from ready to standby Goes to standby.
Switch from standby to ready Wakes from standby.
Photo info open / Photo info close Opens or closes the info screens.
Select B&W mode / Select color mode Changes the capture style.
Web view: close Closes the panel (same as bb.close()).

The full list is in the touchscreen editor's action list.

document.getElementById('takePhoto').addEventListener('click', () => bbRun('Start photobooth'));

Caption matching is forgiving. Case, spaces and the characters : + ( ) & are ignored, so startphotobooth also works.

Breeze Booth action names#

So that widgets written for Breeze Booth run unchanged, these Breeze Booth action names are translated automatically:

Breeze Booth name Runs this Remote Pro action
stillsStart Photo start
gifStart Video/GIF start
videoStart Start video capture
videoEnd Stop video capture
stillsPhotoAccept Preview: accept
stillsPhotoRetake Preview: retake
standBy Switch from ready to standby
switchToStillsAndStart Select photobooth+start
switchToVideoAndStart / switchToGifAndStart Select video booth+start
exit Exit fullscreen photobooth

Each translation is logged as DIAG-WebViewBB: Breeze Booth action alias mapped to '…'.

cancelCountdown, exitFromReady and exitFromStandby have no safe Remote Pro equivalent, so they are ignored like any unknown action.

Actions only work on the right screen#

Actions go through the same path as the Status URL ts command. If the action name is unknown, or the action doesn't apply to the current screen, it is silently ignored and a DIAG-WebView line is written to DSLRRemotePro.log. The page gets no error back, so don't design your page to wait for a response.

The panel isn't on every screen. runAction('Start photobooth') moves the booth off the Ready screen. If the countdown and capture screens aren't ticked for the panel, it is hidden. Your page and its JavaScript keep running (see Panel behaviour), but the guest can't see it. Decide which screens the panel should show on before you wire up actions.


Web View Panel settings#

The panel is set up per profile in File > Photo Booth Settings > Widgets, and positioned in the touchscreen editor. See Widgets for the step-by-step.

Setting What it does
Enable Turns the panel on or off.
URL A https://, http:// or file:/// page. CSS, JavaScript and images next to a local file load normally.
Display on these screens Ready, info, preview, standby, video ready, video info and before/after session. Leave all unticked to only open it with the Web view: open / Web view: close actions.
Hide after (secs) Hides the panel after this many seconds with no activity. 0 = never.
Allowed hosts A ;-separated list of sites the page may navigate to. Blank = only the site in the URL. Navigation anywhere else is blocked, because the booth is a kiosk.
Token ID The prefix for saved values ({<id>_<key>}). Also available to the page as window.bb.actionId. Blank = webview.

Panel behaviour between screens#

Remote Pro keeps one panel. When the booth changes screen:

  • The new screen is ticked: the panel stays or is shown, and the page and everything in it is kept.
  • The new screen isn't ticked: the panel is hidden, not closed. The page is kept and comes back as it was when a ticked screen returns. The browser may pause while hidden.
  • The page is only reloaded when the profile's URL changes, the profile is switched, or the booth exits.

So tick every screen the guest should see the panel on. Anything your page holds in JavaScript survives being hidden either way.

Because the page isn't reset between screens or sessions, add your own reset logic if a game or form should start fresh for each guest, for example when the guest taps Play.

A panel opened manually with Web view: open is not kept when the screen changes.


Example: a scored mini-game#

A game on the Ready screen that reads the guest's name from keyboard input, starts the booth when they tap Play, updates the score on every goal and saves the final stats.

Settings: URL = file:///C:/booth/game/soccer.html, Token ID = soccer, screens = Ready (and any others the guest should see it on).

<script>
(function() {
  function bbGet(k, f) { if (window.bb && window.bb.tokens && Object.prototype.hasOwnProperty.call(window.bb.tokens,k)) { const v=window.bb.tokens[k]; return (v===''||v==null)?f:v; } return f; }
  function bbSet(k, v) { if (window.bb && window.bb.setToken) window.bb.setToken(k, String(v)); }
  function bbRun(a)    { if (window.bb && window.bb.runAction) window.bb.runAction(a); }

  // 1. Guest's name from keyboard input (fallback: event name, then 'Guest')
  const playerName = bbGet('{user_data}', bbGet('{eventName}', 'Guest'));

  let score = 0, attempts = 0;

  document.getElementById('playBtn').addEventListener('click', () => {
    score = 0;
    attempts = 0;
    startCountdown();
    bbRun('Start photobooth');          // 2. start the photo session
  });

  function onGoal() {
    score++;
    bbSet('score', score);              // 3. live score
  }

  function onGameOver() {
    const acc = attempts > 0 ? Math.round(score / attempts * 100) : 0;
    bbSet('score',    score);           // 4. final summary
    bbSet('attempts', attempts);
    bbSet('accuracy', acc);
  }
})();
</script>

Then use the values anywhere tokens work, for example in the email text:

Hi {user_data},
You scored {soccer_score} out of {soccer_attempts} ({soccer_accuracy}%) - see attached!

For complete, downloadable widgets, see the Football Game Example and the other examples under Widgets.


Touch and keyboard input#

The panel handles taps on your HTML directly. Buttons, pointerdown, touchstart, click and dragging all work. Taps outside the panel go to the booth's touchscreen as normal.

Keys the booth reserves (hotkeys and barcode input) are kept away from the page. Normal typing into your form fields works.


Troubleshooting#

All messages below are written to DSLRRemotePro.log.

The page does nothing in a normal browser.
Expected. window.bb only exists inside Remote Pro. The helpers return fallbacks so you can still work on layout and styling.

A saved value doesn't show up.
Check the Token ID matches the token you're using (Token ID soccer → {soccer_…}). Every accepted save is logged, e.g. DIAG-WebViewBB: setToken {soccer_score} = '7'.

runAction doesn't do anything.
Look for DIAG-WebView: page requested touchscreen action '…'. If nothing happens after it, the caption is wrong or the action doesn't apply to the current screen.

window.bb is missing inside Remote Pro.
Look for DIAG-WebViewBB: bootstrap script registration FAILED. Also check the panel loaded the page after the profile loaded, because the API is added when the panel is shown.

Token values are out of date.
They're a snapshot from when the panel was shown. Reload the page, or close and reopen the panel.

The page can't open a link.
Look for DIAG-WebView: navigation blocked by the allow list and add the site to Allowed hosts.


Low-level messages (optional)#

window.bb is a wrapper around the panel's message channel. Pages can also send raw messages, which is useful for older content written before window.bb existed:

window.chrome.webview.postMessage({ cmd: 'ts', action: 'Start photobooth' });
window.chrome.webview.postMessage({ cmd: 'setToken', key: 'score', value: '7' });
window.chrome.webview.postMessage({ cmd: 'close' });