Developer testing guide

Video testing guide for players and uploads

The published set contains a standard clip with audio, a silent clip, and a low-resolution clip. Matching WebM, MP4, and MOV variants let you isolate container behavior from the visual scenario.

Verified . Container, stream, duration, frame-rate, and byte metadata are generated from the committed source files and checked during every build.

Practical checklist

  • Verify container MIME and contained codecs independently.
  • Test audio-present and silent states.
  • Compare duration, frame rate, and dimensions across containers.
  • Test byte-range responses before relying on seeking.

Separate containers from codecs

WebM, MP4, and MOV are containers. Inspect VP9, Opus, H.264, and AAC streams rather than assuming codec support from an extension. Browser and transcoder behavior depend on both layers.

Test player state

Cover metadata loading, play, pause, seeking, muted autoplay, poster display, end events, network failures, and responsive resizing. Keep native controls available as an accessibility fallback.

Verify processing pipelines

Compare duration, dimensions, frame rate, audio presence, and output size after processing. Preserve useful diagnostics for failed jobs without exposing internal storage paths.

Expected results

  • All published fixtures return their registered MIME and exact byte size.
  • Silent clips expose no audio codec while audible clips do.
  • Range requests return 206 and a valid Content-Range.

Common failure modes

  • Treating MOV and MP4 as proof of H.264 support.
  • Testing only videos with audio.
  • A player that downloads the entire file before seeking.

Check the fixture with curl

Download the representative file and print the response status, MIME type, and transferred byte count.

Shell
curl --fail --location --silent --show-error \
  --output sample-3s.webm \
  --write-out 'status=%{http_code}\ncontent_type=%{content_type}\nbytes=%{size_download}\n' \
  'https://assets.testfiles.dev/video/sample-3s.webm'

Fetch and upload the video fixture with Playwright

Fetch the published fixture as a buffer, assign it to a real file input, and verify the browser receives the registered name, MIME type, and byte size.

TypeScript
import { test, expect } from "@playwright/test";

test("uploads a verified video fixture", async ({ page, request }) => {
  const response = await request.get("https://assets.testfiles.dev/video/sample-3s.webm");
  expect(response.ok()).toBeTruthy();
  expect(response.headers()["content-type"] ?? "").toContain("video/webm");

  const buffer = await response.body();
  expect(buffer).toHaveLength(195147);

  await page.setContent('<input id="fixture" type="file">');
  await page.locator("#fixture").setInputFiles({
    name: "sample-3s.webm",
    mimeType: "video/webm",
    buffer,
  });

  const selected = await page.locator("#fixture").evaluate((input: HTMLInputElement) => ({
    name: input.files?.[0]?.name,
    type: input.files?.[0]?.type,
    size: input.files?.[0]?.size,
  }));
  expect(selected).toEqual({
    name: "sample-3s.webm",
    type: "video/webm",
    size: 195147,
  });
});

Use stable sample files

These fixtures have stable URLs, recorded MIME types, byte sizes, SHA-256 values, and dedicated detail pages.

Format references

Copied