Report a bug
ThugTv
Report bugBug
ThugTVEmbed Discord

ThugTV Embed

Put movies and TV on your site with one iframe

A complete video player you can drop into any page: it finds a working stream for the title, plays it in the best quality the viewer's connection allows, and tells your page what is happening. Free, with no sign-up and no API key.

  • Several serversEach title is tried on our own servers in turn, switching automatically if one fails.
  • Up to 1080pAdaptive quality that follows the viewer’s connection, with an optional cap.
  • Subtitles & dubsSubtitle tracks and dubbed audio (Hindi, Tamil, Telugu, …) where the title has them.
  • Your lookBrand colour, control style, title, artwork and episode picker: all from the URL.
  • Events & commandsProgress, episode and end events for resume features; play, pause, seek and episode commands.
  • Free, no sign-upNo API key and no account. Paste the iframe and it works.

Quick start

  1. Find the title on themoviedb.org and take the number from its address: themoviedb.org/movie/27205-inception.
  2. Paste the iframe into your page with that number.
  3. Optional: add options to match your site, and listen to events.
Movie
<iframe
  src="https://embed.thugtv.st/movie/27205"
  width="960" height="540" frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
  allowfullscreen
  referrerpolicy="origin"
></iframe>
TV episode
<iframe
  src="https://embed.thugtv.st/tv/1399/1/1"
  width="960" height="540" frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
  allowfullscreen
  referrerpolicy="origin"
></iframe>

URLs

URLPlays
https://embed.thugtv.st/movie/{tmdbId}A movie.
https://embed.thugtv.st/tv/{tmdbId}/{season}/{episode}A TV episode. Viewers can switch episodes inside the player unless you hide the picker.
https://embed.thugtv.st/tv/{tmdbId}Season 1, episode 1.

A TV ID used as a movie (or the other way round) shows “Movie not found”: TMDB numbers movies and shows separately.

All options

Add options to the URL as a query string. All are optional, and an unknown or invalid value is simply ignored, so a typo never breaks the player. For example:

https://embed.thugtv.st/tv/1399/1/1?color=ff7a00&theme=glass&sub=en&quality=1080&episodes=0

Look

OptionValuesExampleEffect
colorhex colour, 3 or 6 digits, no #color=ff7a00Accent for the Play button, timeline and active controls.
themeclassic · glass · theater · contrasttheme=glassControl style. contrast uses heavier controls for accessibility.
controlscompact · standard · largecontrols=largeSize of the control bar and buttons.
timelineslim · standard · boldtimeline=slimThickness of the progress bar.
hideAfter2 · 4 · 6hideAfter=2Seconds of inactivity before the controls hide.
title0 · 1title=0Hide the title on the start screen, top bar and pause card.
poster0 · 1poster=0Plain black start screen instead of the title's artwork.

Playback

OptionValuesExampleEffect
tsecondst=600Start at this point. For TV, only the episode in the URL.
sublanguage code · offsub=enSubtitles to switch on when the stream has that language.
audiolanguage codeaudio=hiDubbed audio to prefer when the title has it (e.g. hi, ta, te, es).
qualityauto · 1080 · 720quality=720Highest quality to use. Handy for slow networks or data saving.
servervelvet · knight · falcon · citadelserver=knightServer to try first; the others remain as automatic fallbacks.

TV

OptionValuesExampleEffect
episodes0 · 1episodes=0Hide the episode picker and “up next”, so your page controls episodes (see recipes).
autonext0 · 1autonext=0Whether the next episode starts by itself at the end.

Viewers can still change subtitles, audio, quality and server from the player's own menu. Your options set the starting point, and a viewer's own pick wins for the rest of their visit.

Link builder

Pick a title and options, copy your code, and try the real player right here, including the events it sends and the commands it accepts.

Title
Look
Accent colour
default
Playback

URLhttps://embed.thugtv.st/movie/27205

Your embed code
<div style="position:relative;width:100%;aspect-ratio:16/9;background:#000">
  <iframe
    id="thugtv-player"
    src="https://embed.thugtv.st/movie/27205"
    style="position:absolute;inset:0;width:100%;height:100%;border:0"
    allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
    allowfullscreen
    referrerpolicy="origin"
  ></iframe>
</div>

The preview is the real player, ads included.

Events from the preview

Load the preview and press Play: events appear here.

Iframe settings

For a player that fills the width of its container at 16:9 (recommended):

Responsive
<div style="position:relative;width:100%;aspect-ratio:16/9;background:#000">
  <iframe
    id="thugtv-player"
    src="https://embed.thugtv.st/movie/27205"
    style="position:absolute;inset:0;width:100%;height:100%;border:0"
    allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
    allowfullscreen
    referrerpolicy="origin"
  ></iframe>
</div>
  • allow="autoplay; fullscreen; picture-in-picture; encrypted-media" and allowfullscreen make fullscreen and picture-in-picture work, including on phones. Without them the fullscreen button can't work.
  • referrerpolicy="origin" tells the player which site it is on (only your domain, never the page address).
  • Do not add a sandbox attribute. The player is supported by ads and will not start inside a sandbox that blocks them. See Rules.
  • Give the iframe a size: at least 320 × 180. Frames narrower than 860 px get the player's compact, touch-friendly controls.

Events

The player sends messages to your page with postMessage. Every message has source: "thugtv", a type, the title's tmdbId (a string) and mediaType, and for TV the current season and episode.

typeWhenExtra fields
readyThe player has loaded (before Play is pressed).—
playPlayback started or resumed.currentTime, duration
pausePlayback paused.currentTime, duration
progressEvery 5 seconds while playing.currentTime, duration
endedThe video reached its end.currentTime, duration
episodeThe viewer switched episode inside the player.new season, episode
unavailableThe title can't be played (see below).reason
blockedThe player refused to start on this page.reason: sandbox · popups · adblock

Times are whole seconds. Always check event.origin before using a message:

Listening
const PLAYER_ORIGIN = 'https://embed.thugtv.st';

window.addEventListener('message', (event) => {
  // Only trust messages from the player itself.
  if (event.origin !== PLAYER_ORIGIN) return;
  const msg = event.data;
  if (!msg || msg.source !== 'thugtv') return;

  switch (msg.type) {
    case 'progress':
      console.log(`${msg.tmdbId} at ${msg.currentTime}s of ${msg.duration}s`);
      break;
    case 'ended':
      // Show your own "up next" or recommendations.
      break;
    case 'unavailable':
      // Nothing could play: msg.reason says why (see "When a title can't play").
      break;
    case 'blocked':
      console.warn('ThugTV player blocked:', msg.reason);
      break;
  }
});
Example messages
// Movie
{ "source": "thugtv", "type": "progress", "tmdbId": "27205", "mediaType": "movie",
  "currentTime": 754, "duration": 8880 }

// TV episode
{ "source": "thugtv", "type": "episode", "tmdbId": "1399", "mediaType": "tv",
  "season": 1, "episode": 3 }

// Nothing could play
{ "source": "thugtv", "type": "unavailable", "tmdbId": "27205", "mediaType": "movie",
  "reason": "no_source" }

Commands

Your page can control the player. thugtv:episode works at any time; play, pause and seek work once the viewer has pressed Play (browsers need a click before a video may start).

JavaScript
const PLAYER_ORIGIN = 'https://embed.thugtv.st';
const player = document.getElementById('thugtv-player'); // your <iframe>

function send(command) {
  // Address the player's origin, never '*'.
  player.contentWindow.postMessage(command, PLAYER_ORIGIN);
}

send({ type: 'thugtv:play' });
send({ type: 'thugtv:pause' });
send({ type: 'thugtv:seek', time: 600 });                  // seconds
send({ type: 'thugtv:episode', season: 1, episode: 4 });   // TV only

Recipes

Continue watching

Save the position from progress and pass it back with t next time.

HTML + JavaScript
<div id="player-box" style="position:relative;width:100%;aspect-ratio:16/9;background:#000"></div>
<script>
  const PLAYER_ORIGIN = 'https://embed.thugtv.st';
  const tmdbId = '27205';
  const key = 'resume:movie:' + tmdbId;

  // Start where the viewer left off (only if they got past the first 30 s).
  const saved = Number(localStorage.getItem(key)) || 0;
  const iframe = document.createElement('iframe');
  iframe.src = PLAYER_ORIGIN + '/movie/' + tmdbId + (saved > 30 ? '?t=' + saved : '');
  iframe.allow = 'autoplay; fullscreen; picture-in-picture; encrypted-media';
  iframe.allowFullscreen = true;
  iframe.referrerPolicy = 'origin';
  iframe.style.cssText = 'position:absolute;inset:0;width:100%;height:100%;border:0';
  document.getElementById('player-box').append(iframe);

  window.addEventListener('message', (event) => {
    if (event.origin !== PLAYER_ORIGIN || event.data?.source !== 'thugtv') return;
    const msg = event.data;
    if (msg.tmdbId !== tmdbId) return;
    if (msg.type === 'progress') localStorage.setItem(key, String(msg.currentTime));
    if (msg.type === 'ended') localStorage.removeItem(key);
  });
</script>

Your own episode list

Hide the player's picker with episodes=0 and switch episodes from your page.

HTML + JavaScript
<!-- episodes=0 hides the player's own picker: your page drives episodes. -->
<iframe id="thugtv-player"
  src="https://embed.thugtv.st/tv/1399/1/1?episodes=0"
  width="960" height="540" frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
  allowfullscreen
  referrerpolicy="origin"
></iframe>

<ol id="episode-list">
  <li><button data-season="1" data-episode="1">1. Winter Is Coming</button></li>
  <li><button data-season="1" data-episode="2">2. The Kingsroad</button></li>
  <li><button data-season="1" data-episode="3">3. Lord Snow</button></li>
</ol>

<script>
  const PLAYER_ORIGIN = 'https://embed.thugtv.st';
  const player = document.getElementById('thugtv-player');
  let current = { season: 1, episode: 1 };

  function play(season, episode) {
    current = { season, episode };
    player.contentWindow.postMessage({ type: 'thugtv:episode', season, episode }, PLAYER_ORIGIN);
  }

  document.getElementById('episode-list').addEventListener('click', (event) => {
    const button = event.target.closest('button[data-episode]');
    if (button) play(Number(button.dataset.season), Number(button.dataset.episode));
  });

  // Roll on to the next episode when one ends.
  window.addEventListener('message', (event) => {
    if (event.origin !== PLAYER_ORIGIN || event.data?.source !== 'thugtv') return;
    if (event.data.type === 'ended') play(current.season, current.episode + 1);
  });
</script>

React / Next.js component

React (JSX)
'use client';
import { useEffect } from 'react';

const PLAYER_ORIGIN = 'https://embed.thugtv.st';

/** <ThugTvPlayer tmdbId={27205} /> or <ThugTvPlayer type="tv" tmdbId={1399} season={1} episode={1} /> */
export default function ThugTvPlayer({ tmdbId, type = 'movie', season = 1, episode = 1, options = {}, onEvent }) {
  const path = type === 'tv' ? `/tv/${tmdbId}/${season}/${episode}` : `/movie/${tmdbId}`;
  const query = new URLSearchParams(options).toString();     // e.g. { color: 'ff7a00', sub: 'en' }
  const src = PLAYER_ORIGIN + path + (query ? '?' + query : '');

  useEffect(() => {
    if (!onEvent) return;
    const onMessage = (event) => {
      if (event.origin !== PLAYER_ORIGIN || event.data?.source !== 'thugtv') return;
      onEvent(event.data);
    };
    window.addEventListener('message', onMessage);
    return () => window.removeEventListener('message', onMessage);
  }, [onEvent]);

  return (
    <div style={{ position: 'relative', width: '100%', aspectRatio: '16 / 9', background: '#000' }}>
      <iframe
        src={src}
        title="ThugTV player"
        style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', border: 0 }}
        allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
        allowFullScreen
        referrerPolicy="origin"
      />
    </div>
  );
}

WordPress shortcode

PHP
<?php
// functions.php (or a small plugin).
// Usage: [thugtv id="27205"]  ·  [thugtv type="tv" id="1399" season="1" episode="1" color="ff7a00"]
add_shortcode('thugtv', function ($atts) {
    $a = shortcode_atts(
        ['type' => 'movie', 'id' => '', 'season' => '1', 'episode' => '1', 'color' => ''],
        $atts
    );
    // Accept only digits and a 6-digit hex colour: nothing else reaches the HTML.
    foreach (['id', 'season', 'episode'] as $k) {
        if (!ctype_digit((string) $a[$k])) return '';
    }
    $path = $a['type'] === 'tv'
        ? '/tv/' . $a['id'] . '/' . $a['season'] . '/' . $a['episode']
        : '/movie/' . $a['id'];
    $query = preg_match('/^[0-9a-fA-F]{6}$/', $a['color']) ? '?color=' . $a['color'] : '';
    $src = esc_url('https://embed.thugtv.st' . $path . $query);

    return '<div style="position:relative;width:100%;aspect-ratio:16/9;background:#000">'
        . '<iframe src="' . $src . '" style="position:absolute;inset:0;width:100%;height:100%;border:0"'
        . ' allow="autoplay; fullscreen; picture-in-picture; encrypted-media" allowfullscreen'
        . ' referrerpolicy="origin"></iframe></div>';
});

When a title can't play

Not every title is on our servers, and a server can be down for a while. The player always tries every server before giving up. When nothing works, viewers see a clear message with a link to our Discord, where they can ask for the title, and your page receives an unavailable event:

reasonViewers seeMeaning
not_found“Movie not found”No such TMDB ID for this type, or the title was removed.
no_source“This stream is unavailable”Every server was tried and none could play it right now. Viewers can retry or pick a server.
error“Couldn't load this title”A temporary problem looking the title up. Usually fixed by reloading.
site_blocked“Embedding not allowed”Your site has been stopped from embedding the player.
unavailable“Player unavailable”The player itself is down for maintenance.

To show your own message instead, or hide the player:

JavaScript
const PLAYER_ORIGIN = 'https://embed.thugtv.st';

window.addEventListener('message', (event) => {
  if (event.origin !== PLAYER_ORIGIN || event.data?.source !== 'thugtv') return;
  if (event.data.type !== 'unavailable') return;

  // reason: 'not_found' | 'no_source' | 'error' | 'site_blocked' | 'unavailable'
  const box = document.getElementById('player-status');
  box.textContent = event.data.reason === 'not_found'
    ? 'Sorry, we could not find this title.'
    : 'This title is not available right now. Please try again later.';
  box.hidden = false;
});

Rules

  • Ads are part of the player. They keep it free. The player will not start inside a sandboxed iframe that blocks them, or when an ad blocker stops them.
  • Don't cover, hide, shrink or overlay the player, and don't place it where viewers can't see it.
  • Use the iframe. Stream links are signed, short-lived and work only inside the player; copying them out won't work.
  • We can stop sites that break these rules from embedding the player, without notice.
  • Titles can be removed at any time, for example after a copyright notice.

Troubleshooting

The player showsWhyFix
“This website is blocking the player”The iframe has a sandbox attribute (blocked reason sandbox or popups).Remove sandbox from the iframe.
“Turn off your ad blocker”The viewer's ad blocker stopped the player's ads (reason adblock).The viewer allows ads for embed.thugtv.st.
“Movie not found”Wrong TMDB ID or wrong type (a TV ID used as a movie), or the title was removed.Check the ID on themoviedb.org.
“This stream is unavailable”No server could play this title or episode right now.Viewers can retry, pick another server, or ask on Discord.
Fullscreen button does nothingThe iframe is missing allowfullscreen or fullscreen in allow.Use the attributes from Iframe settings.
Your page receives no eventsThe listener checks a different origin, or runs before the iframe exists.Compare event.origin with https://embed.thugtv.st exactly.
“Embedding not allowed”Your site has been stopped from embedding the player.Contact us (below).

FAQ

Does it cost anything? Do I need an API key?

No. The player is free and needs no account or key; the ads inside it pay for the servers.

Why doesn't the video start by itself?

Browsers only let a video with sound start after a click. The viewer's first tap on Play starts it.

Does it work on phones and iPhones?

Yes. On phones the player uses a touch layout; on iPhone, fullscreen opens the system video player, as iOS requires.

Which titles are available?

Movies and TV shows listed on TMDB that our servers carry. Coverage grows over time; use the unavailable event to handle the rest.

Can I choose the server or the quality?

Yes: server= picks the first server to try and quality= caps the quality. Viewers can still switch from the player's menu.

Can I use my own subtitles?

Not yet. The player shows the subtitle tracks each stream comes with; sub= picks which language starts switched on.

Does the player collect data about my visitors?

The player asks for no account and no personal data, and sends your page only the title and playback position. The ads shown in it come from an advertising partner with its own policies.

Contact

Copyright holders: use the report form and include the TMDB ID or the embed URL. Removed titles stop playing in every embed at once.