LiveBarn API · Production integration

Broadcaster-grade streaming,
wired to LiveBarn.

Bearer-authenticated live HLS streams and VOD archives resolved from the LiveBarn API, stitched through Shaka Player with feed-mode switching (Auto / Pano / Play-by-Play), Akamai tokenized playback, frontend DVR rewind, and the full enterprise monetization stack (VAST/VMAP/FreeWheel, companion ads, SSAI cues). Drop the@/sharedmodule into any Next.js app and ship a broadcast-grade experience the same day.

Dev Tool

LiveBarn credentials (developer tool)

Anonymous

Pushes a fresh access token + user id into the running AuthService. Persisted to localStorage so it survives page refresh. Not for production end-users — XSS-exposed; use a server-side cookie + the bundled API proxy instead.

Sign in (password grant)

Only email and password are sent from the browser. The token route adds grant_type=password, device_id, and optional OAuth client_id / client_secret from server env. Then user/getAccount runs via the proxy; on success, credentials apply automatically.

Paste manually

LiveBarn live HLS

Bearer-authenticated GET /api/v2.0.0/surface/akamai/... resolves the Akamai-signed .m3u8 playback URL with auto-rotating streaming tokens.

VOD segment stitching

GET /api/v2.0.0/media/.../begindate/.../enddate/... lists 30-min recording chunks. The hook stitches them into one continuous playback timeline with auto URL refresh.

Feed-mode switching

Auto (4) / Pano (5) / Play-by-Play (9) — runtime toggle that re-resolves the manifest seamlessly without tearing down the player.

Hockey overlays

Period + countdown clock, shots-on-goal, power-play indicator, game feed (goals/penalties/saves), live commentary ticker — fully preserved.

🔒

Tokenized playback

Akamai X-LB-ACCESS-TOKEN / X-LB-STREAMING-TOKEN / X-LB-USER-ID injection, with a future-proof Okta refresh hook ready to wire.

📺

Frontend DVR + reconnect

Local rewind buffer with -10 / -30 / +10 quick-jump and 'Go Live' snap. Auto-reconnect on transient CDN errors, blackout / private session detection.

Live game

Rink-cam manifest, ticking period clock, simulated scoring feed, power-play indicator, shots-on-goal, jump-to-live edge button.

<LiveSportsPlayer
  match={liveMatch}
  commentary={feedCommentary}
  events={feedEvents}
  playerStats={liveStats}
  size="standard"             // 960px max — OTT inline default
  features={{
    simulateLive: true,
    shotsOnGoal: true,
    powerPlayIndicator: true,
  }}
/>

Archived game

Recorded VOD asset, real seek bar, 0.5×–2× playback speeds, no LIVE badge — same component, two flags flipped.

<LiveSportsPlayer
  match={archiveMatch}        // stream.isLive === false
  commentary={archiveCommentary}
  events={archiveEvents}
  size="standard"
  features={{
    simulateLive: false,
    liveBadge: false,
    speedSelector: true,
  }}
/>

Player sizes (market-standard)

The size prop maps to industry-standard max-width values; aspect is always 16:9.

compact
max 480px
Sidebar / card / picture-in-feed embeds
standard
max 960px
Default — inline OTT watch (NHL.tv / LiveBarn / DAZN)
theater
max 1280px
Theater mode / hero (broadcast HD)
cinema
max 1600px
Cinema / kiosk / large monitors
fluid
no max-width
Full-bleed dashboards / immersive views