Skip to content

Why should my app distinguish blocked video autoplay from a failed generation?

Keep generation status separate from player state. A completed private video may fail to autoplay because of browser policy or playback conditions. Handle the play promise, show a clear manual Play control, and investigate player errors before marking the generation or delivered asset as failed.

DESIGN A CLEAR API PRODUCT EXPERIENCEAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Wait for a playable asset; Handle playback rejection; Test multiple playback paths.
Workflow diagram: Wait for a playable asset → Handle playback rejection → Test multiple playback paths. Read the article for evidence and limits.

Playback is a separate state machine

An automatic preview can be blocked even when bytes downloaded correctly. If the interface treats that rejection as a generation failure, the user may purchase a needless replacement. Distinguish download, decoding, playback permission and creative acceptance in your application.

What to do next

  1. 01

    Wait for a playable asset

    Create the player only after your private delivery path has returned the intended content. Track loading and decoding separately from the remote task's completed state so a player issue cannot overwrite the generation receipt.

  2. 02

    Handle playback rejection

    Await or handle the promise returned by play. If automatic playback is denied, retain the completed result and display a user-initiated Play button rather than retrying generation or repeatedly attempting autoplay.

  3. 03

    Test multiple playback paths

    Try muted preview, explicit user playback and a browser configuration that blocks autoplay. Record actual media errors separately, and offer the already completed download when the browser cannot play that particular file.

A concrete example

Illustrative example: a video completes, downloads and loads, but play rejects without a user gesture. The app shows Ready — press Play, retaining the same job and download. The user's click starts playback without any new paid request.

Before you call it ready

  • Autoplay denial keeps completed status.
  • Manual Play is keyboard accessible.
  • Player failure never triggers generation automatically.

When to stop or choose another method

Stop labeling autoplay denial as model failure; investigate the browser/player path while retaining the confirmed task evidence.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation