Smart TVs configuration and best practices

Configurations and good practices to optimise WebOs/Tizen Smart TVs with Bitmovin Web SDK


This article is related to Bitmovin Web SDK and SmartTVs that leverage it. Android TV, Google TV, FireTV and tvOS are out of scope of this article.

Smart TVs are typically resource-constrained devices with limited Memory and CPU capacity. Also the APIs for streaming and DRM handling (MSE/EME) on these platforms are generally incompatible with latest standards of Desktop browsers.

Know your device

Know your environment by researching the documentation on each Smart TV platform and OS release:

Start with Bitmovin sample repositories

The Bitmovin samples are the best resources to get start it with your Smart TV app.

  1. bitmovin-player-tizen-demo
  2. bitmovin-player-webos-demo

Use and retain the best practices demonstrated in the sample apps as a baseline:

  1. Use of the modular player. This keeps the player footprint as small as possible, useful for constrained environments.

  2. Use of the respective platform modules. There are specific modules created for both Tizen and WebOS. While these modules are not 100% necessary for all use cases on all devices, they are recommended to be included as a baseline.

  3. Proactive management of the player buffer. Reducing the front and back buffer reduces player's overhead in managing the buffer, important for lower-resourced devices. The specific settings here (30 for front buffer; 10 for back buffer) are good starting recommendations, but should be tweaked based on segment length used in your streams. For example, with 4s segments, you might adjust this to be 16s or 12s for the front buffer and 12s for the back buffer.
    And, whenever possible, steer away from formats and features that will require additional processing - and therefore resources - as these will play a factor in playback performance. For example, prefer MP4 over TS containers, as the player will have to transmux TS (overhead of converting MPEG-2 TS container into MP4 "on the fly” ).

Special player configurations

tweaksconfig settings

  • Required tweaksConfig settings:
  1. file_protocol:true (only required if the app’s HTML page is put within the TV app. For apps hosted on a remote server it isn’t necessary).

Since some of the devices are not as well equipped, it is furthermore recommended to limit the players buffer:

// you can't use the direct assigments with {[bufferType]: 40]} since older device versions only support ES5
var bufferConfig = {};
var bufferLevels = {};
bufferLevels[bitmovin.player.core.BufferType.ForwardDuration] = 30;
bufferLevels[bitmovin.player.core.BufferType.BackwardDuration] = 10,
bufferConfig[bitmovin.player.core.MediaType.Video] = bufferLevels;
bufferConfig[bitmovin.player.core.MediaType.Audio] = bufferLevels;

playerConfig.buffer = bufferConfig;
  • Analytics Configuration:
  1. origin is required to have Analytics data flow appropriately when the HTML page is put within the TV App. This should match the value you have set for your app_id and added to the allow-list in your player account.

Streaming Format and DRM Considerations

General Recommendations by Platform:

  • Tizen 2.4 (2016) - Playready (DASH + PR/CENC)
  • Tizen 3.x+ (2017+) - Widevine (DASH + WV/CENC)
  • WebOS 3.0 - 3.4 (2016) - Widevine (DASH + WV/CENC)
  • WebOS 3.5+ (2017+) - Playready (DASH + PR/CENC)

Specific configuration recommendations:

Playready DRM:
These settings may not be universally needed for Playready DRM, but are good starting points when attempting PR playback on SmartTV devices.

utf8message: true,
plaintextChallenge: true,
headers: {'Content-Type': 'text/xml'}

Some older Tizen model streaming API might attempt to default to native playback. Ensuring that preferredTech is appropriately set in the playbackConfiguration helps avoid this situation:

	playback : {
		autoplay : true,
		muted : false,
		preferredTech : [{
            player: 'html5',
            streaming: 'dash',

Streams with high playback times

It has been observed, that the Tizen2016 TV has failed to playback streams which have high resulting playback times (~1_600_000_000). It is known, that the device cannot decode BaseMediaDecodeTimes greater than 2^32 bit, but it might already fail with lesser values. If a stream fails to start playback (or if you observe multiple seek operations in rapid succession), it can help to force the BaseMediaDecodeTime rewriting by setting the tweak FORCE_BASE_MEDIA_DECODE_TIME_REWRITE: true

Warning: Using this tweak might also cause some playback issues, like stalls and freezes, when playing streams with multiple short discontinuities (e.g. SSAI streams). Enabling the tweak is only recommended when the playback experience is improved on testing.

Device Information

It is useful to get information logged out directly from the device, especially when submitting logs for further investigation, so readers know exactly where they came from. Device information from the OS can also be informative in terms of profiling and resource utilisation.

WebOS deviceInfo Example:
Using WebOs API Services it is possible to obtain valuable information from the LG smartTV. Please refer to WebOS API documentation to understand how to use it.

Please be sure to include the webOSTV.js into your application in order to use the API.

function deviceInfo () {
	var request = webOS.service.request("luna://", {
	    method: "getSystemInfo",
	    parameters: {
	        "keys": ["modelName", "firmwareVersion", "UHD", "sdkVersion"]
	    onComplete: function (inResponse) {
	        var isSucceeded = inResponse.returnValue;

	        if (isSucceeded){
	            console.log("deviceInfo Result: " + JSON.stringify(inResponse));
	            // To-Do something
	        } else {
	            console.log("Failed to get TV device information");
	            // To-Do something

Tizen segmentPlayback Memory Usage Example:

Tizen TVs provide an API that allows obtaining different types of information from the device.

Please review the Tizen SystemInfo documentation to understand its usage and capabilities.

As opposed with WebOS, there is no need to include any Js file or reference to this API, as it will become available globally when the application runs on a Tizen device.

player.on(bitmovin.player.core.PlayerEvent.SegmentPlayback, function(data) {
    console.log("segment played back: " + JSON.stringify(data));
    console.log("total memory: " + tizen.systeminfo.getTotalMemory() / (1000*1000) + "MB   avail memory: " + tizen.systeminfo.getAvailableMemory() / (1000*1000) + "MB");

What's Next

Getting Started Guides