CnterDocumentationSign in

Start here

  • What Cnter is
  • Core concepts
  • Quickstart

Platform

  • Authentication
  • Conventions
  • Errors
  • Organization
  • The dashboard

Modules

  • Content Management
  • Online Ordering
  • Restaurant Ordering
  • Promotions
  • Reservations
  • Bookings
  • Contact Form

Payments

  • AgnusPAY
  • Tax

Services

  • Address autocomplete
  • Video
  • Email

Reference

  • API reference

Services

Video

A video field is an object, not a URL. Render the player for any value with a videoId — unless it failed.

A full brief for whoever builds against this.

Your customer uploads a video in the dashboard and it is encoded into several qualities. Your site gets an object with an embed URL and a thumbnail URL, both on the same host as everything else. There is no media host to configure, allow-list or add to your image settings — and the player plays from the moment the upload lands, while the qualities are still being prepared.

The field#

json
{
  "videoId": "8f2a1c34-...",
  "status": "playable",
  "playable": true,
  "embedUrl": "https://app.cnter.com/embed/8f2a1c34-...",
  "thumbnailUrl": "https://app.cnter.com/api/public/video/8f2a1c34-.../thumbnail",
  "duration": 92,
  "title": "Kitchen tour",
  "width": 1920,
  "height": 1080
}
FieldNotes
embedUrlThe player. Use it in an iframe, as given.
statusOne of queued, processing, encoding, finished, playable, failed. Only failed should change what you render.
playableInformational: whether the first prepared quality is ready. Not a render gate — the player already plays before this flips (see below).
thumbnailUrlAn ordinary image URL.
durationSeconds. 0 until the video has been analysed.
titleWhat your customer named it.
width / heightPixel dimensions, for sizing the frame. 0 until analysed.

Playing it#

tsx
{field.videoId && field.status !== 'failed' && (
  <iframe
    src={field.embedUrl}
    allowFullScreen
    allow="autoplay; encrypted-media; picture-in-picture; fullscreen"
    style={{ width: '100%', aspectRatio: '16/9', border: 0 }}
  />
)}

That is the whole integration. The player adapts quality to the viewer's connection on its own, so someone on a phone gets a smaller stream than someone on fibre without you doing anything.

Do not append query parameters

The player is configured centrally: which controls it shows, its colours and language, whether AirPlay and Chromecast are offered. That is what keeps every site consistent and lets all of them be adjusted at once. Parameters on the URL fight that.

While it is still encoding#

Render the player anyway — that is the point. A freshly uploaded video plays from the original file while the qualities are being prepared, and the prepared versions take over on their own. During the brief window before the upload itself has landed, the player shows a neutral waiting state and starts by itself. There is nothing to poll and nothing to check except failed.

Do not gate on `playable`

Earlier guidance said to check playable before rendering. That gate now hides a video that would already play. Remove constructions like {field.playable ? <iframe/> : <img/>} and render the iframe for any value with a videoId unless status is failed.

Thumbnails#

GET/api/public/video/{videoId}/thumbnailPublic

The poster frame as an ordinary image.

It works in an img tag, from a server-side fetch, and through an image optimiser alike. Public and keyless, so it needs no proxy.

It is also the right poster for a lazily loaded player: render the thumbnail, swap in the iframe on click, and the page does not carry a video player it may never need.

PreviousAddress autocompleteNextEmail

On this page

  • The field
  • Playing it
  • While it is still encoding
  • Thumbnails