Skip to content

WhepPlay

whepwright is a browser-based WHEP playback tester. It launches a real browser (Chromium, Firefox, or WebKit) via Playwright, subscribes to a WHEP endpoint, and verifies that the browser WebRTC stack can receive and render the stream.

Build

bash
# Requires Node.js and Playwright
cargo build --bin whepwright --features whepwright

Usage

Play a WHEP endpoint in Chromium:

bash
whepwright -w http://localhost:7777/whep/live

Use Firefox and run for up to 60 seconds:

bash
whepwright -w http://localhost:7777/whep/live --browser firefox --timeout 60

Run with a visible browser window for debugging:

bash
whepwright -w http://localhost:7777/whep/live --headless=false

Use the installed Google Chrome for H.265 playback. Headless Chromium does not support H.265 WebRTC, so you also need a visible window:

bash
whepwright -w http://localhost:7777/whep/live \
          --browser chromium --channel chrome --headless=false

Options

OptionDefaultDescription
-w, --wheprequiredWHEP endpoint URL
-t, --tokennoneBearer token for WHEP authentication
--browserchromiumBrowser to use: chromium, firefox, webkit
--channelnoneBrowser channel, e.g. chrome or msedge (Chromium only)
--headlesstrueRun the browser in headless mode (true or false)
--outputhumanOutput format: human, json
--timeout30Overall timeout in seconds

Exit code

  • 0: playback succeeded (WHEP connected and video was rendered).
  • 1: playback failed or an error occurred.

Released under the MPL-2.0 License.