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
- Find the title on themoviedb.org and take the number from its address:
themoviedb.org/movie/27205-inception. - Paste the iframe into your page with that number.
- Optional: add options to match your site, and listen to events.
<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><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
| URL | Plays |
|---|---|
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
| Option | Values | Example | Effect |
|---|---|---|---|
color | hex colour, 3 or 6 digits, no # | color=ff7a00 | Accent for the Play button, timeline and active controls. |
theme | classic · glass · theater · contrast | theme=glass | Control style. contrast uses heavier controls for accessibility. |
controls | compact · standard · large | controls=large | Size of the control bar and buttons. |
timeline | slim · standard · bold | timeline=slim | Thickness of the progress bar. |
hideAfter | 2 · 4 · 6 | hideAfter=2 | Seconds of inactivity before the controls hide. |
title | 0 · 1 | title=0 | Hide the title on the start screen, top bar and pause card. |
poster | 0 · 1 | poster=0 | Plain black start screen instead of the title's artwork. |
Playback
| Option | Values | Example | Effect |
|---|---|---|---|
t | seconds | t=600 | Start at this point. For TV, only the episode in the URL. |
sub | language code · off | sub=en | Subtitles to switch on when the stream has that language. |
audio | language code | audio=hi | Dubbed audio to prefer when the title has it (e.g. hi, ta, te, es). |
quality | auto · 1080 · 720 | quality=720 | Highest quality to use. Handy for slow networks or data saving. |
server | velvet · knight · falcon · citadel | server=knight | Server to try first; the others remain as automatic fallbacks. |
TV
| Option | Values | Example | Effect |
|---|---|---|---|
episodes | 0 · 1 | episodes=0 | Hide the episode picker and “up next”, so your page controls episodes (see recipes). |
autonext | 0 · 1 | autonext=0 | Whether 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.
URLhttps://embed.thugtv.st/movie/27205
<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>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):
<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"andallowfullscreenmake 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
sandboxattribute. 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.
| type | When | Extra fields |
|---|---|---|
ready | The player has loaded (before Play is pressed). | — |
play | Playback started or resumed. | currentTime, duration |
pause | Playback paused. | currentTime, duration |
progress | Every 5 seconds while playing. | currentTime, duration |
ended | The video reached its end. | currentTime, duration |
episode | The viewer switched episode inside the player. | new season, episode |
unavailable | The title can't be played (see below). | reason |
blocked | The player refused to start on this page. | reason: sandbox · popups · adblock |
Times are whole seconds. Always check event.origin before using a message:
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;
}
});// 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).
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 onlyRecipes
Continue watching
Save the position from progress and pass it back with t next time.
<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.
<!-- 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
'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
// 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>';
});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 shows | Why | Fix |
|---|---|---|
| “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 nothing | The iframe is missing allowfullscreen or fullscreen in allow. | Use the attributes from Iframe settings. |
| Your page receives no events | The 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.