/smart-tv-app-development:smart-tv-playback-drm-and-performancefrom smart-tv-app-development
Implements and debugs video playback on Smart TVs: MSE/EME, Shaka Player, HLS/DASH, codecs, HDR, adaptive bitrate ladders, QoE metrics, Widevine/PlayReady/FairPlay DRM, performance and memory optimization on constrained devices, app lifecycle, deep linking, and content feeds.
Ships in smart-tv-app-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Part 2 of 4 of the Smart TV App Development reference (plugin
smart-tv-app-development), covering §4–§7. Sibling skills:smart-tv-platforms-and-10-foot-ui(§0–§3),smart-tv-monetization-certification-and-operations(§8–§14),smart-tv-reference(§15–§20). Section numbers are shared across the set; a reference written as §N →skillpoints into that sibling skill.Currency: Verified August 2026. See §17 →
smart-tv-referencefor the currency snapshot and what goes stale first.
How to read this. Reference, not tutorial. Sections are independent. Three markers:
- [DURABLE] — human factors, hardware physics, or a lesson every TV platform has independently arrived at. Does not expire.
- [PLATFORM] — specific to Roku, Tizen, webOS, Android TV, Fire OS/Vega, or tvOS. Verify against that vendor's current docs, which change annually with the model year.
- [CONTESTED] — real disagreement about approach, usually because the trade-off depends on your budget and platform mix.
⚠️ GOTCHA boxes mark the mistakes that fail certification, get discovered only on a five-year-old TV in someone's living room, or quietly halve your completion rate.
The three framings that organize everything below:
- You are writing for a 2015 phone bolted to a 2025 display. TV silicon is cost-optimized to the bone. Assume ~1–2 GB RAM, a weak CPU, and a GPU that exists mostly to composite video. Your desktop intuitions about performance are wrong by an order of magnitude.
- The remote has a D-pad, and that is the entire input model. No pointer, no touch, no hover, no keyboard. Every interaction is up/down/left/right/OK/back. Focus management is not a detail — it is the UI architecture.
- The platform owner is your distributor, your competitor, and your ad network. Certification is a gate they control, discovery placement is inventory they sell, and on most platforms they take a cut of your revenue. This is a commercial relationship wearing an SDK.
manifest (HLS .m3u8 / DASH .mpd)
→ ABR ladder selection (bitrate/resolution/codec variants)
→ segment fetch → buffer management
→ demux → DECODE (hardware!) → render
→ DRM license acquisition + key handling (§5)
→ subtitles/captions, audio track selection, trick play
[DURABLE] Use the platform's player. On every TV platform, hardware-accelerated
decode is mandatory — software decode of 4K HEVC on TV silicon does not work. That means:
Roku's Video node, Android's Media3/ExoPlayer, AVPlayer on tvOS, and the
platform-specific AVPlay (Tizen) or media APIs on webOS. On web platforms, MSE/EME
exists but the vendor's native path is usually the one that gets hardware decode and DRM
right.
.m3u8) and DASH (.mpd, dominant
in Europe). CMAF lets one set of segments serve both, which is the modern answer to
"must I encode twice?"[DURABLE] TV video quality is measured by four numbers, and users feel all of them:
| Metric | Target |
|---|---|
| Startup time (time-to-first-frame) | < 2 s. Certification programmes test this |
| Rebuffer ratio | < 0.5% of playback time |
| Average bitrate / bitrate at start | As high as the connection sustains |
| Playback failure rate | < 1% of attempts |
⚠️ Startup time is where TV apps most often fail certification and lose users. Techniques: pre-warm the player, start the license request in parallel with the manifest fetch, use a low-bitrate first segment then ramp, and never do a cold cascade of sequential network round trips (auth → entitlement → manifest → license → first segment). Parallelize what you can.
Trick play (FF/RW with thumbnails) requires an I-frame playlist or a sprite sheet of thumbnails. Users expect it; implementing it late is painful.
Captions and subtitles are not optional (§14.1 → smart-tv-monetization-certification-and-operations) — WebVTT, TTML/IMSC, CEA-608/708 —
and must honour the platform's caption style settings, which the user set once in
system preferences and expects everywhere.
[DURABLE] There is no single DRM, and you will implement at least two.
| DRM | Owner | Where it's required |
|---|---|---|
| Widevine | Android TV/Google TV, Fire OS, Chrome, most web TVs, modern Roku | |
| PlayReady | Microsoft | Samsung Tizen, LG webOS, Xbox, many operators |
| FairPlay Streaming | Apple | tvOS, Safari, iOS |
Widevine security levels matter commercially: L1 = crypto and decode both in the TEE (required by most studios for HD/4K), L3 = software (typically limited to SD by licensing policy). Android TV/Google TV gives you L1 on certified devices. PlayReady SL3000 is the hardware-backed equivalent.
Multi-DRM with CENC (Common Encryption) is the standard answer: encrypt once, package once, and serve different license flows per platform. That's what makes shipping to six platforms tractable.
⚠️ GOTCHA — the encryption-scheme trap that silently breaks the older half of your fleet. CENC defines two schemes:
cenc(AES-128 CTR) andcbcs(AES-128 CBC with pattern encryption). FairPlay requirescbcs. Older Widevine and PlayReady devices support onlycenc. Choosing one scheme for everything works perfectly on your test devices and produces a black screen on a large slice of installed sets. You generally need both packagings, keyed off device capability — and this is exactly the class of defect that reaches production because the QA fleet is all recent models.
⚠️ GOTCHA — DRM has dated, vendor-specific server-side requirements. PlayReady revocation endpoints change; running an old license server can mean it quietly stops enforcing current device blocks, while missing a new address can make a modern server return an error the viewer experiences as a black screen. Put vendor DRM changes on a calendar with a re-check date. They are not "set and forget."
Also plan for: HDCP output protection (and the "HDCP handshake failed" support calls it generates through AV receivers), license persistence for offline/download where supported, key rotation for live, and concurrency/device limits as a business rule that must be enforced server-side.
[DURABLE] Budget as if you're targeting a low-end phone from a decade ago. Roku devices run ARM Cortex-A53/A55/A35-class cores (some older models MIPS); TV SoCs across all vendors are cost-optimized, thermally constrained, and shipped with the minimum RAM that passes QA. A $30 streaming stick and a $3,000 OLED may run the same app on very different silicon — and the cheap device is the one most of your users have.
The budgets that actually matter:
| Resource | Guidance |
|---|---|
| App memory | Often a few hundred MB total. Exceeding it means the OS kills you |
| Startup to first interactive frame | Target < 3 s cold |
| Time to first video frame | Target < 2 s (§4.3) |
| Frame time | 16.6 ms — and you will blow it far more easily than on mobile |
| Image decode | The dominant memory consumer in a poster-grid UI |
transform/opacity animations, and keep the node
count low.[PLATFORM] Roku requires memory monitoring for certification. Apps must use the
roAppMemoryMonitor APIs to observe and respond to memory events in order to pass
certification testing — that is, the platform mandates that you handle memory pressure
rather than merely hoping. The BrightScript Profiler and Roku Resource Monitor
are the tools; Roku also ships rokuos-perfetto-utils for tracing.
TV apps get suspended, backgrounded, and killed aggressively, and the user may return hours later expecting to be exactly where they were.
[DURABLE] Save playback position continuously — every few seconds — not on exit. You will not reliably get an exit callback. The same applies to navigation state, partially completed forms, and auth state.
[PLATFORM] Roku's Instant Resume is a formal version of this, and it is becoming a certification requirement: Roku's Spring 2026 certification update added a requirement to implement Instant Resume by 1 October 2026 for apps in the US Streaming Store meeting the specified streaming criteria. The pattern — return the user to exactly what they were watching, instantly — is where the whole industry is heading regardless of platform.
[DURABLE] Deep linking is not a nice-to-have; it is how the platform's search, voice, recommendations, and home-screen rows launch your content. If your app can't be deep linked, it is invisible to the platform's discovery surfaces, which is where a large share of your traffic would come from.
Two modes to support:
You must handle: cold start with a deep link, warm start with a deep link, an unentitled user (route to sign-in or upsell and then continue to the content), and content that no longer exists (a graceful message, not a crash).
Each platform ingests a catalogue feed to power search, voice, and home-screen rows. [PLATFORM] Roku Search Feed / Direct Publisher-lineage feeds, Android TV's Watch Next and channel/program APIs, Apple's TV App integration, Amazon's catalogue ingestion, and Samsung/LG equivalents. Getting into these feeds is usually the highest-leverage growth work available, and it is unglamorous data-plumbing rather than app development.
Continue Watching integration at the platform level (not just in-app) is increasingly expected and, on Roku, tied to the Instant Resume requirement above.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/smart-tv-monetization-certification-and-operationsUse when shipping and operating a TV app: the monetization models (SVOD, AVOD, FAST, IAP) and entitlement, CTV advertising plumbing (VAST, VMAP, SSAI vs CSAI, ad pods) and why measurement is hard, what platform certification actually is and store submission, testing on real devices, analytics and QoE, the cross-platform strategy decision, accessibility, and privacy and ACR./smart-tv-platforms-and-10-foot-uiUse when scoping or designing a TV app. Covers the platform matrix and who actually owns the living room (Roku, Samsung Tizen, LG webOS, Android TV/Google TV, Fire OS and Vega OS, tvOS, VIDAA, SmartCast), the two structural shifts in progress, the frozen-browser problem, why TV design is genuinely different, the 10-foot numbers and the standard layout vocabulary, focus as the architecture, spatial navigation, the remote, and text entry. Includes the router for the whole smart-tv-app-development reference./smart-tv-referenceUse when reviewing a TV app for known anti-patterns, weighing contested questions (native vs web vs React Native, how far back to support, SSAI vs CSAI, whether CTV measurement is trustworthy, platform billing, turnkey OTT platform vs custom build, whether to build for the long tail at all), checking whether a platform or market claim is still current (snapshot verified August 2026), finding the primary and practitioner sources, or needing the numbers, pre-launch checklist, and 'it's broken on TV' triage. Companion to the other smart-tv-app-development skills.npx claudepluginhub the-vibey-project/vibey --plugin smart-tv-app-development