Twitch
Show a Twitch channel's newest videos and most watched clips, playing in Twitch's own player.
Overview: Embed your Twitch videos and clips.
Connect it
- Open Sources and press Add source, then pick Twitch (its subtitle is “Videos and clips”). The form is Connect Twitch.
- In Channel name or link, type the channel’s name (with or without the @) or paste a link to its page on twitch.tv. A link to one of the channel’s videos or clips under twitch.tv/name works too. The box at the top of Add a source (Find a source or paste a link) works out a twitch.tv link for you.
A clips.twitch.tv link or a twitch.tv/videos/123 link does not name the channel, so the form asks you to paste the channel’s own link. A channel name Twitch does not know is refused when you connect, with “Twitch has no channel with that name. Check the spelling, or paste the link to the channel’s twitch.tv page.”
There is nothing to authorize: no sign-in to Twitch, any channel, on every plan. The source follows the channel’s id, so a renamed channel keeps working.
Through an agent, use connect_source with { "type": "twitch", "twitchChannel": "name" }, or setup_widget with source set to twitch and a query (the channel name or a twitch.tv link), or just a twitch.tv link as the query. Through the API, POST /v1/sources takes type twitch, "mode": "live" and twitchChannel.
What is fetched
Each update reads the channel’s past broadcasts, highlights and uploads (its newest videos) and its most viewed clips of the last 30 days, puts them together newest first and keeps up to 24. Each tile is the video’s or clip’s thumbnail with a play mark, and its title is the caption. In Grid and Carousel, tiles are wide (16:9); Masonry follows each thumbnail’s shape and Bento its own cell shapes.
- With Lightbox on, a tile plays the video or clip in Twitch’s own player inside the lightbox. It starts at once, muted, and the visitor unmutes it in the player. On a phone, Twitch’s player shows its own play button and a tap plays it: Twitch only starts a player on its own when it is at least 400 by 300 pixels, and never on a phone. Without the lightbox, a tile links to the video or clip on twitch.tv.
- With Header on, the channel’s picture and @name show above the grid, with a Follow link to the channel. While the channel is streaming, a red Live now shows beside the name, its stream title as the tooltip. A click on it plays the stream in Twitch’s live player in the lightbox, muted at first, whether or not Lightbox is on. A Ctrl, Cmd or middle click opens the stream on twitch.tv in a new tab, as any link does. TileSet checks whether the channel is live when the widget is shown, at most every 2 minutes per channel, so Live now can appear or go up to about 3 minutes late.
Live stream: lightbox or inline
Live stream (on the widget’s customization card, for a Twitch or Kick source) decides where a live stream plays:
- Lightbox (the default): Live now opens the stream in the lightbox, as above.
- Inline: while the channel streams, a live card shows above the tiles, in place of Live now in the header: the stream’s live picture with a play button, its title, category and viewer count, and a “Watch on Twitch” link. A click plays the stream right there in the card, muted at first. Twitch’s player loads only on that click, never with the page, so the card does not slow the page down. When the card is smaller than Twitch’s player minimum (400 by 300 pixels, so on most phones), the click opens the stream in the lightbox instead. The Bento layout keeps Live now in the header and shows no card.
When the stream ends while a visitor is watching, Twitch’s player shows its own offline screen. Through an agent or the API, the option is liveStream, "lightbox" or "inline".
Only the feed grid is offered, as for YouTube, because a video’s text is just its title (see Templates). Layouts are grid, carousel, masonry and bento, light or dark. There are no like or view counts (Likes & comments has nothing to show) and no ratings. A Twitch source can join a mixed feed.
Agents and API keys never receive Twitch content, not even counts: describe_source_content says the content is not summarized for agents, and GET /v1/sources/:id/content answers 403 to an API key. The content reaches a page only through the widget, as with Instagram and Facebook. To check what a Twitch widget shows, use the preview in the dashboard.
How often it updates
A Twitch update costs 2 credits, the same as YouTube. The fastest speed is daily on Free and hourly on Starter and up (hourly is the fastest for Twitch on every paid plan). Slower speeds use fewer credits. Update now waits at least 15 minutes between updates of one Twitch source. Connect lookups are limited to 10 a day per account and 20 per network, as for X. While TileSet’s Twitch app is close to its per-minute limit, a new connect answers “Twitch is busy for this app right now, so nothing was looked up. Try again in a minute.” See Update speed and schedules and Plans and credits. On the free plan a source nobody has viewed for 14 days pauses until its next view.
The 24 hour rule
Twitch’s developer terms allow a copy of its content for 24 hours only. So TileSet never shows a copy more than 23 hours old: past that, the next view of a widget fetches the channel again, free, whatever update speed you chose. A slower speed still keeps the content within a day while the widget is viewed. A video or clip the channel deletes is gone at the next update.
A Link in bio block shows nothing from a Twitch source once its copy is 23 hours old, until the source’s next update. For a source on a Link in bio page, choose Twice a day or faster: a daily update leaves the block empty for about an hour each day.
Thumbnails and the channel picture are not copied. Your visitors’ browsers load them from Twitch. The player is Twitch’s own (player.twitch.tv for videos and live streams, clips.twitch.tv for clips), so a visitor who plays a video or a stream loads Twitch’s player, and Twitch’s own privacy policy applies to it. If your site sets a content security policy, see Install snippet for the frames to allow.
Reconnecting
Nothing to reconnect: there is no sign-in to expire. If the wrong channel was matched, remove the source and connect it again with the channel’s link.