OTT: Video Services on Samsung TV

This post is also available in: Russian

Samsung SmartTV Based Development

Every day, more Connected TVs emerge, so it is a high time to consider delivering your content right to your user bedroom. Doing this is pretty easy, you just need to develop a proper application. However at this time, the development process is different for each TV brand, which somewhat complicates the issue. Today, we will brief you on application development for Samsung SmartTV.

When designing your application, please keep in mind that your familiar mouse based navigation is not going to work there, for a simple reason that there is no mouse. So you have to highlight an active control and define the logics of cursor movement. An ideal option is to create two active zones: the sidebar and the full height content. This way, you will combine user-friendly vertical content scrolling with the capability to point the cursor to the menu and move to another section of the application. Also, take your time to think of vertical application architecture. This is because of the following application-level requirement: Clicking on the Back button should move the user a level up.

Prior to beginning the development, read the documentation and download the SDK. The SDK exists under Windows only, and we had, for some unknown reasons, a Korean-only interface. But fortunately you need SDK just to wrap your application and launch the emulator.

We developed our application for the ’11 platform, so everything outlined below is not likely to apply to ’12 platform, as Samsung has changed the engine to Webkit (hooray!) and has highly enhanced its API accessible from Javascript. For platform specifications, please go here. Today, it still makes sense to develop for the ’11 platform, as there is still a lot of such devices on the market.

In the process of our development, we always strive to use off-the-shelf and time proven solutions. But most of the available JavaScript libraries are excessive and we have very limited resources. Also, they are not designed for a long operating cycle, and due to this the application starts to behave unpredictably. A typical issue is a possibility of re-initialization, which is not easy to track.

Notwithstanding the previous paragraph, we decided to use jQuery because of its simplicity, reliability and scalability. Using this library, we implemented all the interface including animation. The only thing that did not work was Ajax. Generally, that should not be surprising since the network is accessed through a custom implementation of XHR.

During the development, we faced a lot of fascinating points we would like to dwell on:

  • The video on TV is shown under all HTML elements. This would not have been an issue, be it the way outlined in the documentation. But in the emulator, it works the other way round, and this is confusing.
  • All methods of reassigning/disabling of buttons are working neither in the emulator nor in the device. After a long brain storming, we produced the following code. Despite the documentation, not all buttons can be reassigned, e.g. SOCIAL and SEARCH: if you click them, the application is closed.
  • The operations involving DOM are very costly. There is an option to abandon jQuery.append() in favor of widgetAPI.putInnerHTML (), as it skips the garbage collector and frees up the memory immediately. But there is a downside here: on immediate removal of the structures from memory, the variables that might have referred to these structures suddenly take on an indeterminate state and if reused throw JS errors. This issue should be taken into account.
  • Based on documentation, the ’12 platform has a built in jQuery, where the speed related issues have been resolved.
  • Due to limited memory capacity, with many dynamically loadable pictures on the screen, the TV fails to load and display pictures at all. But the application still continues to run. Such issues are quite irregular and we have not traced any dependency here, however this is one of few bugs that are reproduced with the emulator But, unfortunately, the debugging capabilities are limited to text output to the console. The only solution found on the ’10-11 platform is to simplify the interface. Alternatively, we can paginate the output (for instance, if we have a directory with pictures). In such a case, a new HTML document opened will purge the previous HTML from the memory.
  • Debugging: As this is Maple, there is no familiar and beloved console.log() here. Instead, we have alert() that outputs text to the emulator console. For myself, I have made ??such a "crutch"
  • Most important, take care to clean the bindings and remove unused elements from the DOM (widgetAPI.putInnerHTML()). This helps not to reach the memory limits and avoid a multitude of bugs.
  • Samsung recommends, prior to creating a new XMLHttpRequest object, to clean an old object to avoid memory leaks.
  • Although Samsung declares that ’11 platform supports HTML5 and CSS3, that is far from it. At least I have not been able to find where exactly they support it. So in your development efforts you’d better focus on HTML 4.01 and CSS2 with all the relevant consequences.
  • The video player supports accelerated playback (both forward and backward), allowing you to implement a usual TV rewind feature. However, empirically we have been identified 5 rates only: -4X, -2X, 1X, 2X, 4X

In conclusion I would like to warn you that developing an application without a test device is not a very good idea as application behavior on an emulator is apparently different from a real TV, with certain API features crashing the emulator. In addition, I would like to point out that it is quite difficult to find information on TV based development, in general, and for Samsung, in particular. Within a year of our active involvement with such applications, only few posts were published on that. Mostly, these are materials on how ridiculous and unbearable the situation is today.

Hopefully, our experience will help you in your efforts.

Leave a Reply

Leave a Reply

Wowza Transcoder AddOn

This post is also available in: Russian

Wowza-Transcoder

Following our latest review of the features of Wowza Media Server, let’s now look at how to transcode video streams using this plugin. This feature is helpful when you only have a single source of high quality video and you would like to deliver the video to multiple devices. Yet another example is video stream failback to audio only in an iOS application (AppStore’s requirement), where you need an additional stream with cut-off video. A typical approach to this problem requires a transcoder (you can also generate an audio only stream using the new Adobe Media Server 5.0). Usually, a transcoder is a separate server optimized for video handling. Wowza offers an alternative: transcoding at the media server level. Let’s look at how it works in more detail. (more…)

Leave a Reply

Adobe Media Server 5 and Adobe Access 4

This post is also available in: Russian

iOS DRM with Adobe Access

We are happy to report that, a new release has been published of the two main Adobe products that you need to build a professional Over The Top (OTT) service. Adobe Media Server Professional 5 is a media server required for pre-processing and delivery of content to a broad range of devices. Adobe Access 4 is a content protection server, now enhanced with support for iOS devices. This way, Adobe has solved the issues of cross-platform delivery of premium content to most of today’s popular devices. In the next posts, we will provide guidelines on migrating and configuring of new releases. But for now, let’s look at some of the technical features of the new products. (more…)

Leave a Reply

Wowza

This post is also available in: Russian

Wowza

Wowza Media Server 3.1 is a popular media server to enable live streaming and VOD content delivery. Wowza Media Server’s major benefit is that it supports a variety of media formats. In this post, we will discuss how to enable live streaming using Wowza. (more…)

Leave a Reply

HTML5 <video> Analytics

This post is also available in: Russian

If you offer online video services, no doubt you have not once thought of video views analytics. In a Flash-based OSMF framework, there is GTrackPlugin to collect statistics on content viewing. Also, you can also use our OSMF Video Analytics.

However, if your service HTML5 based, you need a purpose designed viewing analytics. To build such a plugin, HTML5 Media API should be used. For more on this API, read this post on HTML5 player implementation. (more…)

Leave a Reply

HTML5 Video Player Development

This post is also available in: Russian

HTML5 JS Player

Year by year, we become more involved with media technology than ever before. The World Wide Web is also sensitive to this trend as shown by immense success and popularity of online video services, such as YouTube. However, you cannot run such systems without the technology for video content playback at the end user level.

A classical approach is to build a video player with Flash. Probably you can hardly find a more popular Web browser plugin than Flash Player today. However, a weakness of this approach is the necessity to install the Flash plugin, missing from many devices by default. For example, whatsoever popular iPhone and iPad are, they cannot run Flash applications from within the browser. The way out of this situation is to use HTML5. (more…)

Leave a Reply

How to Develop AIR Video Applications for Android

This post is also available in: Russian

android video apps

Today, smart phones and tablets have become integral parts of our daily life. People interact with such devices frequently and lengthly over a day. So, mobile and tablet applications have become important channels for content distribution. Launching of virtually any major service includes ad-hoc application development. Segmentation of mobile applications greatly increases the cost to implement a mobile strategy. Adobe AIR allows you to reduce the cost-to-market for cross-platform services. You can develop your application once and then adapt it easily to a range of devices or screens (also, there’s more dexterous Flash developers on the market than iOS or Android experts). In this article, we’ll dwell on some features regarding development of mobile applications with Adobe AIR. (more…)

Leave a Reply