Skip to content
Spine Media Player
Esc
↑↓navigate↵open⌘Jpreview
On this page

Getting started

Put Spine's live channels on your website in a few minutes.

The Spine Media Player plays Spine’s live channels on your websites and in your apps. Spine runs the streams and the schedule. You add the player to your pages.

Choose how to embed the player

Both run the same player, and both always load its latest release, so you never update your pages for a new version. If you’re not sure, use the hosted script. Choose the iframe when your pages can’t load scripts, or when your site has protected playback and many of your viewers have iPhones or iPads older than iOS 17.1.

Building something else?

  • An iOS or Android app: Mobile apps shows the player in a WebView.
  • A React or Vue app, from npm: npm packages are coming soon. Until then, the hosted script works in every framework.

What you need from Spine

Spine sets up each of your websites as a site before the player plays there. Your production website, your staging website and each app are separate sites.

Send Spine:

  • How you’ll embed: the hosted script or an iframe.
  • The origins of the pages that show the player. An origin is the scheme, host and port, such as https://www.example.com. https://example.com is a different origin, so list both if both serve pages.

Spine sends you:

  • Your site’s embed ID, such as 01jdm8q3vz5k7r2x9c4n6b8t0w.
  • The channels your site can play, each with its slug, a short name such as spor-1, and which of them is your site’s default channel.

That’s all you need to start. The IDs in this guide are examples, and won’t play.

Everything you exchange with Spine

You send Spine:

  1. Each site you want to embed on. Your production website, a staging website and each app count as separate sites.
  2. For each website, the exact origins of the pages that show the player. Origins must be https, apart from http://localhost for local testing. No paths, wildcards or trailing slashes.
  3. How each site loads the player: an iframe, the hosted script or npm packages, or an app that opens the embed in a WebView. Spine sets the site up to match (see Security and access).
  4. For the hosted script and npm packages: the domains your pages run on. The player’s licence must cover them.
  5. For a site on customer grants: the public key of each key pair your backend signs grants with, unless you ask Spine to make the pair (see Your grant key).

Spine sends you:

  • The player host. In production, https://player.spinectrl.com. All examples in this guide use it.
  • Each site’s embed ID, as Spine’s links and snippets write it. In full it’s emb_01jdm8q3vz5k7r2x9c4n6b8t0w, which embeds take too and grants name.
  • The channels assigned to each site, each with its slug, and which of them is the site’s default. Spine’s embed links and snippets name channels by slug, and so does a grant you limit to one channel.
  • Each site’s protection level: off, player grants or customer grants (see Security and access).
  • For a site on customer grants: the key ID of each public key you sent, and the private key and key ID of each pair Spine made for you (see Your grant key).

Embed IDs, channel slugs and channel IDs aren’t secrets: they appear in your page source. What stops other websites from playing your streams is the site’s origins, Spine’s delivery restrictions and, on a protected site, short-lived credentials (see Security and access).

Good to know

What the player does for you
  • Autoplay, muted. Browsers block autoplay with sound, so the player starts muted and shows a “Tap to unmute” button. If a browser blocks even muted autoplay, the player shows a play button.
  • Controls. Play and pause, sound, a LIVE badge that shows how far behind live the viewer is (press it to jump to live), a quality menu and fullscreen.
  • Channels. Where Spine allows it for your site and your embed asks for it, a channel menu beside the quality menu lets viewers switch between your site’s channels, without leaving your page.
  • Low latency and standard. Spine’s schedule picks the channel’s mode. The player switches between them as the schedule says, which can interrupt playback for a moment. Where Spine allows it, viewers can pick the other mode in the quality menu.
  • Off air. Between broadcasts the player shows an “Off air” cover with the time playback returns, and downloads nothing.
  • Recovery. Network drops and stream failures are retried on their own. If recovery runs out, the viewer gets a “Try again” button.
  • Data saver. By default the player picks a quality that fits its size on screen, lowers it while the page is hidden, and stops downloading when nobody is watching or listening.
  • Isolation. The player draws in its own shadow DOM (or its own frame), so your CSS can’t break it and its CSS can’t leak into your page.
How it fits together
  • One embed per site. A site has one embed ID (emb_…) and the origins of the pages allowed to show the player.
  • One channel at a time per player. A channel is one live feed, such as a race track’s broadcast. Embeds name it by its slug, or by its channel ID (chan_…). Each player plays the channel its embed names, or the site’s default when it names none. Where Spine allows it, viewers can switch between the site’s channels in the player (see Channels).
  • The schedule is Spine’s. Spine decides when a channel plays at low latency, at standard latency or is off air. The player follows that schedule on its own. You never reload it for a schedule change.
  • The player updates itself. Spine releases player updates centrally. The iframe and the hosted script always load the current release. npm packages change only when you upgrade them.
What's available today
Integration Status
Hosted script (<spine-player> element and JS) Available.
Iframe embed Available.
App WebViews (iOS, Android, React Native, Flutter) Available. The WebView opens the embed URL, or a page of yours that shows the player.
npm packages (@spinemedia/player, -react, -vue) Coming. Built, but not yet published to npm. Spine will tell you when they are. The package scope may still change.
Protected playback (player grants, customer grants) Available. Spine sets each site’s protection level. With customer grants, your backend vouches for each viewer with grants it signs itself. See Security and access.
Native app players (AVPlayer, ExoPlayer) Not yet. There is no API yet for an app to get stream URLs. Use a WebView for now.
Browsers and languages

The player is built for current versions of Chrome, Edge, Firefox and Safari, and for these versions and later: Chrome and Edge 100, Firefox 100, and Safari 15 on macOS, iPhone and iPad. Test on the devices your audience uses before launch.

It speaks English and Turkish, following each viewer’s browser unless you set the language (see Settings). It doesn’t support AirPlay, Chromecast, DVR (seeking back through the broadcast), subtitles or other languages yet.

Getting help

Something doesn’t play? Start with Troubleshooting, which also lists what to send Spine when you get in touch.