Samsung smart TVs run Tizen OS with a Chromium-based web engine for web apps. It is the largest installed base of smart TVs globally, which means most streaming services need a Samsung build. But the platform has its own set of quirks, constraints, and development patterns that do not map neatly to standard web development. This page covers what you need to know: the Tizen runtime, app packaging, lifecycle management, remote navigation, memory constraints, playback integration, and how to keep app startup time reasonable.
Tizen overview
Tizen is Samsung’s operating system for smart TVs (and some other devices, but the TV variant is what matters here). For app developers, the relevant pieces are:
- Web engine: A Chromium-based browser engine that renders your HTML/CSS/JS app. The Chromium version depends on the TV model year. Older TVs run significantly older Chromium versions, which affects feature support.
- Tizen Web APIs: Samsung-specific JavaScript APIs for device capabilities like key handling, app lifecycle, storage, network status, and media playback (AVPlay).
- Samsung Seller Office: The developer portal where you manage app submissions, device certificates, and distribution.
- Tizen Studio: The IDE and CLI tools for building, packaging, signing, and deploying Tizen apps. You can also use your own build tools and just use Tizen Studio for packaging and signing.
The development model is essentially web development with platform-specific additions. You write HTML, CSS, and JavaScript. You add Tizen Web API calls for device integration. You package the whole thing into a .wgt file (which is basically a signed zip) and submit it to Samsung’s app store.
App lifecycle
Understanding the Tizen app lifecycle prevents a category of bugs that are hard to reproduce in development but common in production.
Visibility states:
- Foreground: Your app is visible and has input focus. Normal operation.
- Background: The user pressed Home or switched to another app. Your app is still running but should stop or pause media playback and reduce resource consumption.
- Suspended: The OS has suspended your app to reclaim resources. Your JavaScript stops executing. When the app resumes, it should restore state without a visible glitch.
Key lifecycle events:
visibilitychangeevent tells you when the app moves to/from background.tizen.application.getCurrentApplication().addEventListener('appcontrol')handles deep link launches.- There is no guaranteed “about to be killed” event. The OS can terminate your app without warning if memory pressure is high enough.
Common mistakes:
- Not pausing playback when the app goes to background. This wastes resources and can cause audio to continue playing over the home screen, which Samsung’s QA will reject.
- Assuming app state persists between suspend/resume cycles. Save state to local storage periodically.
- Not handling deep links. If your app supports content links from Samsung’s recommendation system, the appcontrol handler needs to parse the incoming URI and navigate to the correct content.
Packaging and signing
Samsung TV apps are distributed as .wgt packages, which follow the W3C widget packaging format (with Samsung extensions).
Config.xml is the app manifest. It declares:
- App ID and version
- Required privileges (network access, storage, TV input, etc.)
- Content entry point (usually index.html)
- Tizen API feature requirements
Signing is required. You need a Samsung developer certificate (for testing) or a Samsung distributor certificate (for production). The signing process can be frustrating: certificates expire, device serial numbers need to be registered, and the signing tools sometimes produce unhelpful error messages.
Practical tip: set up a CI pipeline that handles packaging and signing automatically. Manual packaging is error-prone and slow. Tizen Studio’s CLI tools (tizen command) support automated packaging and signing with certificate profiles.
Remote navigation and key handling
Samsung TV remotes provide directional navigation (up, down, left, right, enter, back) plus dedicated keys (color buttons, number keys, channel up/down, play/pause/stop). Your app needs to handle these inputs.
Registering keys: Unlike a browser where keyboard events just work, Samsung TVs require you to explicitly register which remote keys your app wants to receive. Use tizen.tvinputdevice.registerKey() for each key you need. If you forget to register a key, pressing it will do nothing (or worse, trigger a system action like exiting your app).
Focus management: Samsung does not provide a built-in spatial navigation framework for web apps. You need to manage focus yourself. This means tracking which element is focused, handling directional key events to move focus to the appropriate neighbor, and providing a visible focus indicator.
Libraries like LRUD (Left-Right-Up-Down) or custom focus management modules can help, but they need to be tested thoroughly on real hardware. Focus edge cases (what happens at the end of a list? what happens when a dialog opens on top of a focused element?) are a common source of navigation bugs.
Back button behavior: Samsung’s QA tests will check that the back button does something sensible from every screen. Typically, back should navigate to the previous screen or, from the root screen, show an exit confirmation dialog. Getting back button behavior wrong is a common certification rejection reason.
Memory constraints
Samsung TVs from the last few years typically have 2-3 GB of total RAM, but your app does not get all of it. The OS, system services, and the Chromium rendering process all consume memory. Your app’s JavaScript heap typically has 200-500 MB available, depending on the model.
Memory management strategies:
- Virtualize long lists. Do not render 500 content tiles simultaneously. Render the visible ones plus a small buffer, and recycle DOM nodes as the user scrolls.
- Use lazy loading for images. Load thumbnails as they approach the viewport, and unload them when they scroll far enough away.
- Avoid large in-memory data structures. If you have a content catalog with thousands of items, page it. Do not load the entire catalog into memory.
- Monitor memory in development. The Tizen Web Inspector (accessible via the debug connection) shows JavaScript heap usage. Check it after navigating through your entire app.
What happens when memory runs out: the OS kills your app. There is no warning. The user sees the home screen. This is the worst possible user experience, and it typically only happens during long sessions or after extensive navigation, which means it rarely shows up in quick dev testing.
Playback and AVPlay
Samsung provides two paths for video playback:
HTML5 video element with MSE works on Tizen TVs, but the MSE implementation has platform-specific behavior. Buffer management, codec change handling, and source buffer limits can differ from standard Chromium. Most streaming player libraries (Shaka Player, dash.js, hls.js) work on Tizen, but you may need platform-specific workarounds.
AVPlay is Samsung’s native media player API. It provides lower-level control over playback and can offer better performance and reliability than the MSE path on some devices. AVPlay handles its own buffering, DRM integration, and codec negotiation.
When to use AVPlay vs MSE: if your cross-platform player library works well on Tizen (test it), stick with MSE for code consistency. If you are seeing specific playback issues on Samsung devices that you cannot resolve through the MSE path, AVPlay is worth evaluating. Some teams use MSE for most platforms and AVPlay specifically for Samsung.
DRM on Samsung: Widevine is supported on most modern Samsung TVs. PlayReady is also available on some models. DRM testing must happen on real Samsung hardware because the DRM module behavior (license caching, renewal, security level) is device-specific.
App startup time
Samsung cares about startup time. Their certification guidelines specify maximum acceptable times from launch to first usable screen. But beyond certification, fast startup matters for users: a TV app that takes 8 seconds to show content feels broken.
Where startup time goes:
- Chromium engine initialization (you cannot control this)
- JavaScript parsing and execution of your app bundle
- Network requests for initial content (API calls, configuration, authentication)
- Image loading for the first visible screen
- Player initialization (if auto-playing content on launch)
Optimization approaches:
- Minimize your initial JavaScript bundle. Code-split aggressively. The first screen should only load the code it needs.
- Inline critical CSS. External stylesheet fetches add latency.
- Make initial API calls in parallel, not sequentially.
- Show a meaningful loading state immediately, even before content data arrives. A skeleton screen is better than a blank screen.
- Defer non-critical initialization (analytics, secondary API calls, prefetching) until after the first screen is interactive.
- Cache the previous session’s content catalog locally so you can show stale content immediately while fetching fresh data in the background.
Measurement: Use the Tizen Web Inspector’s Performance tab to profile startup. Measure from the point where your index.html starts loading to the point where the first interactive screen is rendered and responsive to input.
Getting a Samsung TV app right requires attention to the platform-specific details that do not show up in a generic web development workflow. The web engine is familiar, but the constraints, the lifecycle, the input model, and the performance ceiling are all shaped by the fact that you are running on a television with a remote control, not a laptop with a keyboard.
More platform details
See our Samsung Tizen platform notes for additional technical references.
Samsung Tizen Notes