Smart TV¶
PRESTOplay for web supports smart TV platforms including Samsung Tizen, LG webOS, Hisense VIDAA, and other platforms with MSE and EME support. This page covers platform-specific features, known limitations, and integration guidance.
Polyfills¶
Smart TV platforms run a wide range of web engine versions. Some older devices run engines as old as Chromium 38 or WebKit 538.2, which may be missing features that PRESTOplay for web relies on.
Load the polyfill before any other SDK modules to ensure compatibility across all supported devices:
import "@castlabs/prestoplay/cjs/polyfill.min.js"
Older Tizen engines also require your app to be bundled and transpiled to ES5 before deployment. See Getting started for SDK distribution details.
Memory and performance¶
Smart TV platforms vary in available memory and processing power. Keeping resource usage low helps ensure smooth playback across all supported devices, including older and lower-end models:
Keep DVR windows short and manifests compact to reduce parsing and memory overhead.
Keep thumbnail grids small — see Large grid images.
Suspend and resume¶
Smart TV platforms that support multitasking can suspend your app — for example, when the user presses the Home button, switches to another app, or the device enters a power-saving mode. Handle these transitions with one of the following approaches.
Automatic pause and resume¶
The simplest approach is to enable pauseWhenInBackground in your player
configuration. When set to true, the SDK automatically pauses playback when
the page becomes hidden and resumes when it becomes visible again:
const player = new clpp.Player('video', {
license: '<your_license_key>',
pauseWhenInBackground: true,
});
This relies on the standard document.visibilitychange event and
document.hidden property, both supported by Tizen and webOS.
Advanced suspend handling¶
For more complex cases — releasing DRM resources or tearing down the player
entirely on suspend, rather than just pausing — listen to
visibilitychange directly:
document.addEventListener('visibilitychange', async () => {
if (document.hidden) {
// App moved to background — release resources
await player.release();
} else {
// App returned to foreground — reload content
await player.open({ source: currentSource });
}
});
Test suspend and resume on each target device. Older Tizen models may reclaim the video decoder on suspend, so reload the player on resume if needed. Some webOS versions terminate the app entirely, so treat returning to foreground as a potential fresh start.
Limitations of advertising¶
IMA SDK¶
The IMA plugin is supported on smart TV devices such as Samsung TV and LG TV in experimental mode. Google doesn’t officially verify support for the IMA SDK on smart TVs. Because the platform relies on a single video element for both content and ad playback, there are some known limitations:
Post-roll ads: analytics integrations report a new playback session after a post-roll ad finishes, because the player content must be reinitialized.
Pre-roll ads on webOS: the player waits for the main content to reach the playing state before detaching the video element for the ad break, which can cause a brief flash of the main content before the pre-roll starts.
Behavior may vary across smart TV models, since the IMA SDK behaves differently across devices — verify playback on your target devices.
When using custom playback with a single video element and VAST tags, set
isVast: trueinImaConfigurationto ensure VAST playback is selected.
Refer to ImaConfiguration and its disableCustomPlayback option
to disable ads on smart TV devices if needed.
Skippable ads¶
The IMA SDK doesn’t support skippable ads on smart TVs and rejects any VAST
creative with a skipoffset attribute. Set up device-based targeting rules
on your ad server so smart TV traffic only receives non-skippable VAST
creatives.
Limitations of thumbnails¶
Large grid images¶
Thumbnail image grids with large resolutions may not process correctly on some smart TVs. We’ve observed unexpected downscaling of images larger than approximately 10,000 × 10,000 pixels on certain Hisense and Philips TV models. Split large image grids into multiple smaller grids to avoid this.
Older Tizen TVs¶
PRESTOplay for web provides both native and MSE-based playback on older Tizen TVs.
Native playback¶
PRESTOplay for web wraps the available native player implementation
(AVPlay) to support feature-rich playback of DRM-protected assets. The SDK
supports native playback on Tizen versions 2.3 and 2.4.
import { clpp } from "@castlabs/prestoplay";
import "@castlabs/prestoplay/cl.mse";
import "@castlabs/prestoplay/cl.tizen";
const player = new clpp.Player('video', ...);
player.open({
source: {
url: 'http://demo.cf.castlabs.com/media/tos_new/DEMO.mpd?v=2',
type: clpp.Type.DASH,
},
// ...
drm: {
// ...
},
});
Subtitle streamer¶
Native playback on Tizen 2.x TVs doesn’t support embedded subtitles for MPEG-DASH streams. To address this, PRESTOplay can side-stream and display text alongside native playback.
This works well with VOD assets; some live assets can show synchronization issues, and Castlabs continues to improve the streamer in this area.
Subtitle streaming is the preferred way to show text on older Tizen devices and is enabled by default. If you need to disable it, add this to your configuration:
const config = {
// ...
tizen: {
sideStreamText: false,
},
};
You need the MSE module and the component that parses the manifest type you want to side-stream text from. For example, to side-stream a MPEG-DASH asset with embedded subtitles:
import { clpp } from "@castlabs/prestoplay";
import "@castlabs/prestoplay/cl.mse";
import "@castlabs/prestoplay/cl.dash";
import "@castlabs/prestoplay/cl.tizen";
const player = new clpp.Player('video', ...);
player.open({
source: {
url: 'http://demo.cf.castlabs.com/media/tos_new/DEMO.mpd?v=2',
type: clpp.Type.DASH,
},
});
MSE/EME-based playback¶
PRESTOplay for web supports MSE/EME playback for all Tizen versions 2.3 and
later. Older Tizen TVs, such as 2015 and 2016 models running versions 2.3 and
2.4, implement an older version of the EME specification (0.1b), which may
limit some advanced DRM features compared to modern EME implementations. The
current level of support is enough for most common use cases.
For MSE/EME-based playback on Tizen, don’t include or use the native Tizen component:
import { clpp } from "@castlabs/prestoplay";
import "@castlabs/prestoplay/cl.mse";
import "@castlabs/prestoplay/cl.dash";
const player = new clpp.Player('video', ...);
player.open({
source: {
url: 'http://demo.cf.castlabs.com/media/tos_new/DEMO.mpd?v=2',
type: clpp.Type.DASH,
},
// ...
drm: {
// ...
},
});
Recommendations¶
We recommend MSE-based playback on older Tizen platforms whenever possible, to go beyond the native player’s limitations and access the full set of features PRESTOplay for web provides. For Smooth Streaming content, though, native playback performs better, since patching Smooth Streaming media segments for MSE compliance in JavaScript can add significant overhead on older Tizen TVs with limited computing resources.
DRM¶
According to the specifications, older Tizen TVs support PlayReady and Widevine Modular from Tizen version 2.4 onward. Based on our tests, PlayReady-based DRM playback provides the most reliable support, and we haven’t confirmed that Widevine works properly on those versions. If you target older Tizen TVs, we strongly recommend PlayReady or multi-DRM protection for your assets.