Safe Mode not working with canvas StartStop button

Hi together,

me again :stuck_out_tongue:

I just found out, the safe mode does not work with the OSC Button with the OSC Command “/global/playStop” or “/global/playPause” - it simply just works as if the Safe Mode is turned off.

In parallel the Safe Mode works in the Performance view though!

Is this an easy thing to include? I already pressed Stop/Pause by mistake twice :stuck_out_tongue:

I feel like @leolabs abd @agustinvolpe wanna know about this, as it can mess with the performance of an act.

Thanks in advance!

Best,
Max

Hey @Basstor,

This is actually expected behavior rather than a bug: Safe Mode’s confirmation only applies to AbleSet’s native transport controls (Setlist, Performance and Lyrics views). Canvas OSC buttons send OSC commands under the hood, and Safe Mode doesn’t apply to OSC — that’s why it still works for you in Performance View but not on your button.

You can rebuild the confirmation yourself with a Script button. Set the button type to Script and paste this into Script on Press:

// Not playing → start right away, no confirmation
if (!osc("/global/isPlaying")) {
  sendOsc("/global/play");
  return;
}

// Playing → require a second press within 3s to confirm
if (local("confirmStop", false)) {
  setLocal("confirmStop", false);
  sendOsc("/global/pause"); // ← swap for "/global/stop" if you'd rather stop than pause
} else {
  setLocal("confirmStop", true);
  sendOsc("/notify/toast", "all", "Confirm", "Tap again to stop", 3000);
  await sleep(3000);
  setLocal("confirmStop", false); // window closes on its own
}

The only line you change for the two behaviors is the confirmed one: /global/pause continues from the same spot, /global/stop resets to the song start. First press shows a toast and opens a 3-second window; a second press within it does the action.

You can also see this exact use case in action in the official tutorial.

Hope that helps!

2 Likes

Hi @agustinvolpe,

adjusted the functionality of my play/stop button and it immediately works as designed!

For me it is even better as the safe mode, as I am still able to queue the next song and to have the safety feature in the play/stop button!

Good job, man!

Best,

Max

1 Like