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:
[Tizen documentation on web environments by version](🔗)
[LG WebOS documentation on web environments](🔗)
## Start with Bitmovin sample repositories
The Bitmovin samples are the best resources to get start it with your Smart TV app.
Use and retain the best practices demonstrated in the sample apps as a baseline:
_Use of the modular player_. This keeps the player footprint as small as possible, useful for constrained environments.
_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.
_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:
**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:
**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.
**DASH:** 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:
**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.
**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.
## What's Next
**Getting Started Guides**
[Using the Web player on Samsung Tizen TVs](🔗)
[Using the Web player on LG webOS TVs](🔗)