All skills
callstackincubator avatar

/react-native-tv-best-practices

@fa0bad0 official

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

Use this Skill: https://skilld.dev/gh/callstackincubator/agent-skills/react-native-tv-best-practices

This session only. Nothing lands on disk.

referencesvideo-players.md

≈825 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Video Players for React Native TV

Quick Reference

  • Choose the player after the target platform and DRM/protocol path are known
  • Native TV targets usually end at AVPlayer/ExoPlayer through a wrapper or native module
  • Web-based TV targets can use Shaka, hls.js, or dash.js in the browser context
  • For seek thumbnails, prefer BIF or another indexed single-file format over many image requests

Available Players

Player Platform Best For
AVPlayer iOS, tvOS Native Apple playback, FairPlay DRM
ExoPlayer Android TV, Fire TV Wide format support, Widevine DRM
react-native-video Cross-platform Wraps AVPlayer + ExoPlayer; easiest setup
react-native-theoplayer Cross-platform THEOplayer SDK wrapper
Shaka Player JS (all platforms) DASH + HLS, advanced ABR, multiple DRMs
hls.js Web-based TVs HLS playback in browsers
dash.js Web-based TVs MPEG-DASH reference player

Player-Control Checks

  • Do not mount multiple hidden player instances for preview + main playback unless the target device can decode them concurrently.
  • Keep player controls remote-focusable even when video is buffering or DRM is negotiating.
  • Separate seekbar focus state from playback progress state so rapid scrubbing does not fight onProgress.
  • Tear down preview playback before starting protected main content on memory-constrained devices.

Thumbnail Generation — BIF Format

The Broadcast Image Format bundles all thumbnails in one indexed binary file:

  • Single network request (vs. individual image downloads)
  • Indexed structure for instant lookup by timestamp
  • thumbIndex = Math.floor(videoTime / interval)

For large videos (2+ hours), use a native module for BIF parsing. Cache BIF files locally.

Focus During Scrubbing

  • Debounce thumbnail updates (100-200ms) during rapid scrubbing
  • Preload adjacent thumbnails during idle moments
  • Lazy load distant timeline parts to optimize memory

Shaka Player for Enterprise

For complex streaming (live sports, multi-DRM, custom ABR), choose the architecture explicitly:

  • Web-based TV targets: Run Shaka in the TV browser/webview context and render controls in the web UI.
  • Native React Native targets: Prefer AVPlayer/ExoPlayer through react-native-video, THEOplayer, or a custom native module. If Shaka is required for packaging/ABR logic, treat it as an orchestration layer and bridge the native playback surface deliberately; do not assume browser Shaka drops into a native RN view unchanged.

When to Use What

Scenario Recommendation
Basic HLS/MP4 playback react-native-video
Simple DRM (single platform) react-native-video with DRM config
Enterprise multi-DRM, live sports Shaka Player or native players
Web-based TVs (Tizen, webOS) Shaka Player, hls.js, or dash.js

Related Skills

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides comprehensive documentation and best practices for developing React Native applications for TV platforms. It contains technical guidelines for focus management, performance, and video playback without any malicious patterns, obfuscation, or unsafe code execution.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at fa0bad0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago

README badge

README badge for callstackincubator/agent-skills/react-native-tv-best-practices