PlayerStream
EN
Ko-fi

Guides / Create an addon

Addon · advanced

PlayerStream extensions.

What the app understands beyond the usual format: more data for TV channels and a whole catalog in one go. Other apps ignore it, so your addon still works in them.

Only content you have permission for. Whoever creates an addon is responsible for what it offers, and whoever adds it to the app, for what they add. These pieces are for serving your own streams properly; none of them bypasses protection.

01

The playerstream section.

A playerstream object in three places: the manifest, each channel (meta) and each stream of an addon with TV channels.

WhereFieldWhat for
manifestxmltvThe program guide (XMLTV, also .gz), over http or https.
channel (meta)numeroThe channel number.
channel (meta)tvg_idIts id in the XMLTV guide.
channel or streamarchivoCatch-up (below). The stream's setting overrides the channel's.
streamcabecerasHeaders for requesting the stream (on top of those in proxyHeaders.request).
streamdrmProtection: ClearKey or Widevine (below).

playerstream.tipo and playerstream.biblioteca are reserved for PlayerStream's addons and Server: they grant no permission and do nothing in a third-party addon.

a channel with everything
{
  "id": "demo-5",
  "type": "tv",
  "name": "Fable Cinema",
  "genres": ["Movies"],
  "logo": "https://tu-sitio.example/tv/logos/5.png",
  "playerstream": {
    "numero": 5,
    "tvg_id": "fable.example",
    "archivo": { "tipo": "append", "dias": 3, "fuente": "?start={utc}&end={utcend}" }
  }
}
02

Catch-up.

If your server keeps what has already aired, the guide offers “Watch from the beginning” on past programs (those channels show a clock). The app builds the address with archivo: tipo, dias (1 by default) and fuente (a template). Watching what has already aired is a Lite+ perk (also in Premium and Ultimate, which include it).

tipoThe address
defaultThe filled-in template. If it starts with http, it's the full address; if not, it's appended to the channel's.
appendThe template, always appended to the channel's address.
shiftThe channel's, with ?utc=<start>&lutc=<now>.
flussonicFor Flussonic servers: the channel's address must end in …/channel/index.m3u8 or …/mpegts.
xcFor an Xtream Codes server: /timeshift/user/password/minutes/YYYY-MM-DD:HH-MM/id.ext.

Template placeholders

PlaceholderReplaced with
{utc}, {start}The program's start, in seconds (Unix time).
{utcend}, {end}The program's end.
{lutc}, {now}, {timestamp}Now.
{duration}, {duration:60}The duration in seconds, or divided (60: in minutes).
{offset}, {offset:60}How long ago it started.
{Y} {m} {d} {H} {M} {S}The start date and time, in the device's time zone.
{utc:Y-m-d H:M:S}The time in that format (also {start:…}, {end:…}, {now:…}), in the device's time zone.

All of them also work with $ in front (${start}). A placeholder it doesn't know is left as is. A program that started before the archive's dias can't be watched.

03

Protection (DRM).

For your encrypted streams, in each stream's playerstream.drm (in Spanish or English, as you prefer):

ClearKey: the keys, in the response
"playerstream": {
  "drm": {
    "tipo": "clearkey",
    "claves": { "TU_KID_EN_32_HEX": "TU_CLAVE_EN_32_HEX" }
  }
}
Widevine: your license server
"playerstream": {
  "drm": {
    "tipo": "widevine",
    "licencia": "https://tu-sitio.example/licencia",
    "cabeceras": { "Authorization": "Bearer EL_PERMISO_DE_ESTA_PERSONA" }
  }
}
  • Fields: tipo/type (clearkey or widevine), licencia/license (http or https), cabeceras/headers and claves/keys ({kid: key}, each as 32 hex characters or 16 bytes in base64).
  • Widevine uses the device's: on Android, yes; on Windows, no (the channel opens in another player); in the web version, the browser's (if the license server allows CORS).
  • ClearKey: Android and the web; on Windows, with a single key in the response.
  • PlayReady and FairPlay are not supported. And the app never bypasses protection: without a license or keys, the channel doesn't play.
04

Compressed catalog.

For an addon with many titles (thousands), it's better if the app doesn't have to go page by page: in the manifest, a dedicada section with the path to a .json.gz containing everything, and its version. The app only downloads it when the version changes, and its titles appear directly in Movies and Series.

manifest.json
{
  "id": "org.example.mi-videoteca",
  "version": "1.0.0",
  "name": "Mi videoteca (example)",
  "resources": ["stream"],
  "types": ["movie", "series"],
  "idPrefixes": ["tmdb:"],
  "catalogs": [],
  "dedicada": {
    "catalogo": "catalogo.json.gz",
    "version": "2026-10-22.1"
  }
}
catalogo.json (gzip-compressed: catalogo.json.gz)
{
  "campos": ["tipo", "tmdb", "titulo", "fecha", "poster", "fondo", "genero", "rating", "hay4k", "ultimo"],
  "titulos": [
    ["pelicula", "45745",  "Sintel",         "2010-09-27", "", "", "Animation#Fantasy",  "7.0", "0", "2026-10-22"],
    ["pelicula", "133701", "Tears of Steel", "2012-09-26", "", "", "Science Fiction",    "6.3", "0", "2026-10-22"]
  ],
  "episodios": {}
}
  • campos gives the column order; each row in titulos, its values. A row with a different number of columns is discarded.
  • tipo: pelicula or serie. tmdb: the TMDB id (digits only). poster and fondo: a TMDB path or a full address (or empty). genero: separated by #. rating: 7.5 or 7.5/10. hay4k: 1 or true. ultimo: the date you uploaded it (sorts “latest”).
  • episodios: for each series, which episodes you have: {"<tmdb>": {"1": [1, 2, 3]}}.
  • With dedicada, the manifest's catalogs are not used. If the catalog isn't ready yet, leave version empty.
  • In these requests the app sends the X-Dispositivo header with the device model.

Two more options

  • viendo: a path. While someone is watching something from your addon, the app calls it at most once a minute with ?tipo=movie&id=tmdb:45745&titulo=…, and with ?fin=1 when they finish (for example, to count how many devices are watching at once). If you use it, say so in your privacy notice.
  • publica or fuera: the address copied by the “Copy” button in Settings → Content → Addons (for example, the public one, if the app added it with a home address).
05

Per-link data.

Instead of the app guessing them from the text, each link can state them in its own dedicada:

a link
{
  "name": "Mi videoteca",
  "url": "https://tu-sitio.example/videos/sintel-1080p.mkv",
  "dedicada": {
    "nombre": "Sintel.2010.1080p.mkv",
    "resolucion": "1080P",
    "tamano": 1180090590,
    "idiomas": ["eng"],
    "audio": "AC3 5.1"
  }
}

Fields: idiomas (a list; overrides whatever the text says), resolucion, tamano (bytes) or peso (text), nombre, calidad, audio (comma-separated) and rango (for example, HDR).