Screen recording buffer flush fails on Sydney edge during ACMA consent prompt via screenRecording API

Pushed the updated screen recording config via Terraform v1.46.0 to mypurecloud.com.au last night, and flow version 15 applies clean in the console, but the screen capture stops doing jack all the moment the ACMA recording consent prompt triggers on the Sydney edge via the screenRecording API endpoint. Latency spikes to 420ms right there, session’s hanging, and mic stays hot while video feed dies completely. Error log shows {"code":"internal_error","message":"Screen recording buffer flush failed during ACMA compliance check"}.

The Sydney edge latency suggests the browser is choking on the buffer flush when the consent modal overlays the canvas. It’s a known race condition with the screenRecording API when combined with heavy DOM updates.

You don’t need to change the flow config. Fix it on the client side by pausing the recording stream before the consent prompt triggers, then resume it. Here’s how I handle it in my wrapper:

// Pause before consent UI appears
await platformClient.ScreenRecordingApi.screenRecordingPause(sessionId);

// Trigger your ACMA consent flow
await showConsentModal();

// Resume only after explicit yes
if (consentGranted) {
 await platformClient.ScreenRecordingApi.screenRecordingResume(sessionId);
}

This stops the video feed from dying while the audio stays hot for the consent recording. The 420ms spike is just the browser context switching. If you keep the stream active during the modal render, the GPU drops frames and the API times out waiting for a clean buffer. Check the videoTrack.enabled state in your console too.