NetCast FAQ

[NetCast/Smart TV(LH57)] Streaming & DRM Combination

In the NetCast/Smart TV(LH57), only the following streaming protocol and DRM combinations are supported.

Streaming ProtocolDRM
HTTPPlayReady v2.0
HLS v3Verimatrix v1.0.5
Widevine v4.5Widevine v4.5No
[NetCast/Smart TV(LH57)] Supported TLS/SSL Version

The versions of supported TLS/SSL in NetCast and Smart TV(LH57) are as follows:

TLS/SSL VersionNetCast 3.0NetCast 4.0/4.5Smart TV(LH57)
TLS v1.1SupportedSupportedSupported
TLS v1.0SupportedSupportedSupported
SSL v3.0/v2.0Not SupportedNot SupportedNot Supported
[Streaming Protocol] Can I develop an app using Smooth Streaming?

LGE does not recommend you to use Smooth Streaming in your application. (Both webOS TV and NetCast)

How can I check SW Version / SDK Version in my TV?

If you are using LG Smart TV loaded with the NetCast platform, go to Setting and select Support > Product/Service Info. Here, you can check [Software Version] and [SDK Version] of your TV.

How can I unzip and extract LG Smart TV SDK Installer from the downloaded files?

LG Smart TV SDK Installer files have been split and compressed with WinRAR. You can unzip and extract the files using WinRAR or other programs compatible with WinRAR.

[Caution]
LG Smart TV SDK 3.0.1 for Win64 Installer file has been split up into 2 parts. File names of the divided parts are all same and these names should remain the same when you try unzipping. Thus, before you unzip the files, please check if the file names are all same, including space or underbar. (Each file name has its unique number like part1 and part2 at the end of its name.)

Where can I get tips to develop apps related with second screen TV and companion apps?

Please refer to UDAP Specifications section of the document.

In this section, developers can acquire the protocol-related knowledge needed to implement the controller application to control LG Smart TV. Especially Remote Controller Service (netrcu) section will be helpful for the development of remote control application.

Does LG Smart TV support DIAL?

LG Smart TV (NetCast 3.0, NetCast 4.0, NetCast 4.5) supports DIAL (Discovery and Launch Protocol).

To develop an application using DIAL, you can refer to references provided by DIAL web site. Please refer to the following caution when you develop LG Smart TV application using DIAL.

[ Caution ]
Generally, to launch an application located in the 1st screen, you have to register the name of the application that you want to launch to DIAL web site. In LG Smart TV, you MUST put the name of the application directly in your code. (Registration is not needed) Also, the name of the application MUST be converted to URL encoding type. (e.g. "app title" -> "app%20title" )

* How to know the name of the application in LG Smart TV?
When you submit your LG Smart TV application to LG Seller Lounge, you will input the name of your LG Smart TV application in the "App Title" field. You can use that value as the name of the application to launch at the LG Smart TV.

Compatibilities of Web Open APIs on LG Smart TV 2014

According to our policy, the following Web Open APIs will not be compatible with the LG Smart TV 2014 platform.

  • AppToApp APIs: Since LG will provide a new library for 2nd screen applications in webOS TV platform, UDAP will not be supported in LG Smart TVs loaded with webOS TV.
  • SNS APIs: Removed from LG Web Open API on June 2013.
[App Test] How can I test using USB in the real TV device?

To test using USB, please try according to the following process.

  1. Make a zip file with your app source. (using export app test in the file menu of LG Smart TV IDE)
  2. Upload a zip file to app test on LG Developer site. (without digital signing)
  3. Download the DRMed file from LG Developer site.
  4. Make "lgapps" directory at the root of USB.
  5. Make "installed" directory under "lgapps" directory. ( USB root > lgapps > installed)
  6. Extract directory from DRMed file and copy it under the 'installed' directory.
  7. Log in the TV with your TV Account. Register at either the TV. This account is different from LG Developer Site's account.
  8. Insert USB into the TV.
  9. Go to My APPs.
  10. Click USB icon.
  11. Run your app.

Caution

Please read the following note.

  1. If Remote Debugging is not needed, remove the ‘LG Inspector’ folder in the zip file which is exported from “Export App Test” menu. Or, just compress the WebContent folder of your project into zip format. Then, upload the zip file on LG Developer Site > App Test menu.
  2. If Remote Debugging is needed, you must export the app with “Export App Test” menu and upload the exported zip file on LG Developer Site > App Test menu.

If an application zip file includes the ‘LG Inspector’ folder and deployed on TV when you are not using the remote debugging function, the following problems may occur.

  • Back and Smart Home button does not work normally.
  • Screen freezes after the app is launched for the first time and then back button and Home button are pressed sequentially.

In this case, you should power off the TV and restart the application.

Duplicate location warning message appears during installing the LG IDE Plugin.

LG Smart TV SDK provides the LG IDE Plugin for web application development in Eclipse Java EE.

If the LG IDE Plugin installation is not the first time, the following duplication warning can be occurred by selecting the LGPlugin.zip file from [Archive] button.

Screen shot of duplicate location warning message

Click [Cancel] button in the above window. Then, choose the existing location where LG Smart TV SDK has been installed before from the "Work with" combo box.

Popup Image of choosing the existing location

The "Work with" will be set with the existing location.

Popup image of setting "Work with" item

Then you can install the LG IDE Plugin continuously.

Why I have to install the Oracle VirtualBox?

From LG Smart TV SDK V2.1.0, you must install the Oracle VirtualBox on your PC to use LG Smart TV SDK Emulator 2012 or 2013 before installing the LG Smart TV SDK.

If Oracle VirtualBox is not installed on your PC, the installer automatically downloads and installs Oracle VirtualBox at the end of the installation step. But the system may be slow during installation and the network must be connected in your PC. If the network is not connected, the installer cannot download Oracle VirtualBox. In this case, you can download it manually from  http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html

I can't use the LG IDE after installing the new LG Smart TV SDK.

Did you delete the LG Smart TV SDK folder manually instead of uninstalling, then did you install the new LG Smart TV SDK on the same PC?

If so, you can meet the following problems, because incorrect environment variables are set to LG_SDK_HOME and LG_SDK_PROPERTIES. Please check the environment variables and change the LG_SDK_HOME and LG_SDK_PROPERTIES to the actual installation path.

If the error messages pop up continuously despite the above mentioned, follow the next steps.

  1. Delete LG_SDK_HOME and LG_SDK_PROPERTIES from the environment variables.
  2. Delete ‘C:\Program Files\Zero G Registry’ folder. (This folder may be hidden)
  3. Delete LG Smart TV SDK folder where the old SDK is installed.
  4. Install the LG Smart TV SDK again.
When I open Eclipse after installing the LG IDE Plugin in Mac OS, problem occurred.

If you installing the LG IDE Plugin in Mac OS, then you must change the .jar file as below to develop a web application in LG IDE Plugin.

  1. Move to [opt/LG_Smart_TV_SDK/Resources > Libraries/jarformac] folder .
  2. Copy org.eclipse.wst.server.preview.adapter_1.1.0.v20090311b.jar
  3. Paste org.eclipse.wst.server.preview.adapter_1.1.0.v20090311b.jar into the [plugins] folder in Eclipse.
  4. When you do not change the .jar file, the following error message appears during open Eclipse.

Popup image of an error: "SDK Directory Path cannot be read."

How to solve the LG Smart TV SDK installation problem on Linux or Mac.

To install the LG Smart TV SDK using a terminal, you should first change the permission. Follow the below steps. 

[For Linux]

  1. Go to the downloaded folder in terminal and change the permission of extracted installation package.
    $ CD [downloaded folder]
    $ chmod +x LG_Smart_TV_SDK_Installer.bin
  2. Then, run the SDK installation package using 'sudo' command in the terminal as root.
    $ sudo ./LG_Smart_TV_SDK_Installer.bin

[For Mac]

  1. Go to the downloaded folder in terminal and change the permission of extracted installation package.
  2. $ CD [downloaded folder]
    $ chmod -R +x LG_Smart_TV_SDK_Installer.app
  3. Then, run the SDK installation package using 'open' command in terminal.
  4. $ open LG_Smart_TV_SDK_Installer.app
When installing the new LG Smart TV SDK version, "Instance Management Error" window appears.

If the previous version of LG Smart TV SDK is not uninstalled or the previous installation directory of LG Smart TV SDK is deleted manually, the following popup appears during installing the new version of LG Smart TV SDK.

Popup image of Manage Instances

Follow the next step to solve the problem.

Case 1> If the previous version of LG Smart TV SDK is not uninstalled, click [OK] button in the popup window. Then, the previous LG Smart TV SDK is automatically uninstalled.

Case 2> If the previous installation directory of LG Smart TV SDK is manually deleted, uninstalling the previous version of LG Smart TV SDK cannot proceed and error message pops up as below.

Popup image of Instance Management Error

Click [OK] to close the installer. Then delete the following hidden file manually.

For Windows, C:\Program Files\Zero G Regitstry\.com.zerog.registry.xml

For Linux, $HOME/.com.zerog.registry.xml

For Mac, /library/preferences/.com.zerog.registry.xml

[App Test] When inserting USB into LG Smart TV, "Failed to Load Apps" window appears.

When testing application on Real TV, the DRM-packaged application must receive the key from SDP for decryption. But the key may be delayed or not received depending on the network status. In this case, you can try to input USB again. Also, applications on USB have the different decryption keys. If one application is displayed on TV but the other applications are not displayed on TV, it means the only one application received the key for decryption.

Is there any API to activate/deactivate the Magic Remote Control mouse - pointer in web application?

LG Smart TV SDK does not have any API to activate the MRCU (Magic Remote Control Unit) mouse. And NetCastMouseOff API to deactivate the mouse only works in the NetCast 2.0 (the models of 2011).

We provide NetCastMouseOff API for backward compatibility in the NetCast 3.0, but it is not working. In the NetCast 3.0, the mouse gets deactivated automatically when the half of the mouse movement continues for 3 seconds.

How to fix the SDK Directory path problem

If you see the message same as "SDK Directory Path cannot be read" and "Cannot find lgsetup.xml" when you click project icon in the IDE.
you must delete LG_SDK_HOME variable in the user variables for the username of environment variables.

In Windows 7

  1. Right Click on the computer icon on your desktop and choose [Properties] option.
  2. In the System window, Click on [Advanced system settings] in the left pane.
  3. In the System Properties window, Select [Advanced] tab and click on [Environment Variables ...] button.
  4. In the Environment Variables window, you will notice two columns [User variables for a user name] and [System variables].
  5. Select LG_SDK_HOME variable in the user variables for the username and click [delete] button. (Don't delete or edit LG_SDK_HOME and LG_SDK_PROPERTIES in the system variables)
  6. Click [OK] button in the Environment Variables dialog window.
  7. Click [OK] on System Properties window.
  8. Close System window.

After delete LG_SDK_HOME, please try to run the IDE and click project icon. It will work normally.

How well does the browser in LG Smart TV support HTML5?

At this point, the browser in LG Smart TV supports almost every function of HTML5. However, only audio/video tags are opened to developers now because of the performance and security issues. 
See http://html5test.com for your reference.

How do I know on which product my application can run according to the SDK version I used?

The products (NetCast), which application can run on, differ according to the App SDK version.
Therefore, check the product where your applications will run and select an App SDK version on LG Seller Lounge.

  • App SDK version 01.05.000
    You can run your application on products that have Device SDK version 01.05 (Smart TV 2011/NetCast 2.0) or Device SDK version 02.00 (Smart TV 2012/NetCast 3.0).
  • App SDK version 02.00.000 or higher
    You can run your application on products that have Device SDK version 02.00 (Smart TV 2012/NetCast 3.0).

You can check the Device SDK version from TV menu, SUPPORT > Product/Service > SDK Version.

When I use Eclipse, I meet ‘JVM terminated. Exit Code=-1’ error message.

If you meet “JVM terminated. Exit code=-1” error message during the usage of Eclipse, it means that you need to set memory size or eclipse path in the eclipse.ini file.

  1. Go to the eclipse installation directory.
  2. Open the eclipse.ini file.
  3. In eclipse.ini, modify the following row as below.
    • Before: -Xmx512m
    • After: -Xmx256m

    Or, check the eclipse installation path and set as below.
    Note that this row should come above–vmargs.

    -vm C:\Program Files\Java\jre6\bin
  4. Save the file and restart Eclipse.
NetCast API for Back button function

The NetCast Platform supports the proprietary API, “window.NetCastBack()”, to provide the back function to previous NetCast menus. A JavaScript application can use this API for users to move back to previous NetCast menus. The following code shows how application authors use this API.

function processBack()
{
     if (window.NetCastBack) {
           window.NetCastBack();
     }
}
How to get the current network type

To get the current network type, NetCast platform provides “'networkType” property. Please refer to the following example.

var device = document.getElementById("device");
networkType = device.networkType; // 0 : wired network, 1 : wireless network

NetCast platform does not provide “get WiFi signal data” method.  But you can use “bitrateInstant” for drawing signal strength.

For example,

var playInfo = document.video.mediaPlayInfo();
bitrateInstant = playInfo.bitrateInstant;

Please refer to the Video Application Reference code for more detailed information.

Features of LG Smart TV Emulator

LG Smart TV Emulator is a tool that provides developers with the same environment as the target DTV on their PC. Content developers can test DTV Browser and Flash contents on their PC using this emulator. The emulator emulates the actual hardware, library, and graphics of DTV, which are compatible with the PC environment.

LG Smart TV Emulator has the following features:

  • Playing web content for TV with LG Browser emulation
  • Playing Flash content for TV with LG Flash emulation
  • Remote control unit emulation

LG Smart TV Emulator has some differences from the LG Browser and Flash player on the target DTV. Developers should keep in mind these differences when they test applications on the emulator. For detailed information, see Section 1.3 Differences from the Target of LG DTV Emulator NetCast 2.0 (2011) User Guide or LG DTV Emulator NetCast 3.0 (2012 VM) User Guide.

What is NetCast™?

NetCast™ Entertainment Access offers instant streaming of movies, TV shows, video, and a Widget-based user experience via Ethernet connectivity directly to the television. Consumers can instantly stream an almost endless catalog of entertainment from viral videos and movies to photo-sharing Web sites without the need for a separate PC.

What are the version numbers of DirectFB and open library used in LG Smart TV?

The version numbers of DirectFB and open library used in LG Smart TV are as follows:

  • DirectFB: 1.2.7
  • Gtk:2.12.9
  • cairo:2.17.5
How can I change the aspect ratio of LG TV?

You can change the aspect ratio using the [Q.MENU] (quick menu) button during video playback on the full screen. However, this does not work if you operate user interface and play a video at the same time.

Aspect ratio of LG Smart TV

LG Smart TV supports 16:9 and 4:3 for video playback.

The Magic remote control does not work.

Only one Magic remote control is available for each TV set. You cannot operate the remote control that has been already connected with other TV. When you attempt to connect the remote control that has been already connected to other TV, the remote control does not work. 

If you want to reset the remote control, disconnect it from the TV by pressing the [OK] button and the [Mute] button at the same time for 10 seconds. Then, register the remote control with the TV set you want. Press the [OK] button for 10 seconds to register it. Then, the TV screen displays the registration user interface.

If the registration does not work, reset the Magic remote control. To reset, press [Back] and [Home] buttons at the same time for 5 seconds. Then, red light on the Magic remote control blinks 3 times. After reset, try again the registration.

What is the OSD’s resolution that is supported by the browser?

The resolution is 1280 x 720.

Is there a cache type that can store data permanently? Does the disk cache exist?

Currently, the lifetime of flash memory for reading and writing is limited for the TV Browser. The space to store data permanently is not provided. That is, the disk cache is not used. RAM only provides 18 MB cache (memory cache is available). Cookie supports a maximum 32 MB of flash memory.

[App Test] Is there any constraint for testing application on TV with USB?

Once an application is installed through USB, it is executable on maximum 5 devices with the same LG Apps IDs. If an application has been executed with ID “A”, the application is not shown on other TVs with ID “B”. However, once an application is installed on TV, it can be shown with different IDs on the same TV.

If I use LG Resource Tool and LG Configuration Tool, the error message appears.

To execute LG Resource Tool or LG Configuration Tool normally, JRE should be installed on your PC. At JRE download page, choose “Windows x86” or “Windows x64” which depends on the Windows version of your PC.

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html (JRE V1.6.0_29)

http://www.oracle.com/technetwork/java/javase/downloads/jre-6u30-download-1377142.html (JRE V1.6.0_30)

When I test my application on TV, I can see the icon on MyApps screen but the application does not operate.

You must check the SDK and firmware version of TV before start testing application. To test application through USB, the SDK version of TV should be at least 1.5. Also, it is recommended to keep the latest firmware version.

I need to use LG Virtual(QWERTY) Keyboard in my application. Where can I get the library?

Go to TOOLS & SDK > Sample Codes > LG Web_Virtual Keyboard category and download it. Also, refer to the “LG Web Application Development Guide” for detailed usage guides

How much distance from the screen should I consider for TV users?

You should consider 10-foot (3.5 meters) experience for TV UI design. Refer to the “LG Smart TV and Media Product UI Guideline” document for UI guidelines.

What are the mandatory fonts for LG Smart TV?

It is mandatory to use ‘LG Display Font’ or ‘Tiresias Font’ for text. Image texts are free to use any font. Be sure that these fonts can only be displayed on LG devices.

Refer to the “LG Smart TV and Media Product UI Guideline” document for UI guidelines.

Refer to the “LG Web Application Development Guide” document for detailed usage guides.

Do you have the minimum size rule for clickable items?

Yes, it is 54 x 54 pixel.

Refer to the “LG Smart TV and Media Product UI Guideline” document for UI guidelines.

What is the resolution size of LG Smart TV?

It is 1280 x 720 pixel. UI screen of your application should adopt LG screen resolution size.

Refer to the “LG Smart TV and Media Product UI Guideline” document for UI guidelines.

Does LG Smart TV uses proprietary web browser?

No, LG Smart TV uses the WebKit-based browser, on which LG’s APIs are added.

What is the biggest limitation of web applications?

Due to the browser performance issue, heavy games are not appropriate for web applications. However, casual games are okay.

What kinds of codecs and containers are supported in LG Smart TV?

Refer to the list of supported codecs and containers at the “LG Web Application Development Guide” document.

Which version of jQuery is supported for web application development?

Up to the latest version of jQuery is supported.

Can I launch two or more browsers on LG Smart TV at the same time?

Only one browser can be launched at the same time.

Is there any constraint to convert a PC-based full browser source into an LG Smart TV web application?

The web application of LG Smart TV supports 1280x720 and does not support browser scrolling. Therefore, to convert PC-based full browser source into LG Smart TV web application, you should modify that every element displayed on the window. Refer to the “LG Smart TV and Media product UI Guideline” document for this.

What to do when Web application fails to run on emulator or server fails to run in Eclipse?

If you meet 404 error on Emulator when running a web application or the server fails to run in Eclipse, follow the next steps.

  1. Check if a Tomcat server is running on your Windows PC. 
  2. If it is running, stop the Tomcat server on your Windows PC first.
  3. Start the server in Eclipse. (LG IDE Plugin for Web Application Development should have been installed in advance.)
  4. Run the web application on Emulator.

To see how to start a server in Eclipse, refer to the [Developing > Using SDK > Utilities > Checking the Server] section in our library.

How to use my own “user font” in App?

Use HTML <style> or CSS3 @font-face. Your unique font perfectly runs on TV devices or Emulator that LG Smart TV SDK provides. 
For more detailed information, refer to the following URL: 

http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp

Are there any instructions, guides or tips to develop App with jQuery?

Basically, using jQuery has no problem. As Smart TV does not provide jQuery Library directly, developers must link it. Also, take caution, because too many animations decrease performance. Sufficient pretest is recommended.

How to solve the problem if CORS (Cross-Origin Resource Sharing) occurs when App uses Ajax XmlHttpRequest?

LG Smart TV follows the CORS (Cross-Origin Resource Sharing) standard. We only provide the method to control the access in the server.

Find out more about CORS on the http://enable-cors.org/

You can refer to the following sites or other Google sites.
http://software.dzhuvinov.com/cors-filter.html
http://stackoverflow.com/questions/4952838/servers-that-supports-cors

< In case of JSP >
Add the following at the JSP code of the service part. 

Access-Control-Allow-Origin: allow domain
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, Accept, x-requested-with
Access-Control-Max-Age: 1728000

As a result, jsp code should look like this:

response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS");
response.setHeader("Access-Control-Allow-Headers", "Content-Type, Accept, x-requested-with");
response.setHeader("Access-Control-Max-Age", "1728000");

< Apache Server >

  1. Open "httpd.conf" under the "conf" folder at Apache server.
  2. Modify "#LoadModule headers_module modules/mod_headers.so" into "LoadModule headers_module modules/mod_headers.so".
  3. Add the following at the end.
    Header set Access-Control-Allow-Origin "*"
    “*” means that access from any website is allowed. To allow a specific website only, use the form like " www.anysite.com ".

To avoid cross domain issue, try using JSONP.

What API do I have to use to develop an App to play YouTube video contents?

To play YouTube video contents, select the YouTube API (provided by Google) for the play-related features. Then, develop an App with that YouTube API.
To find YouTube API, refer to information on the Internet. 
To play YouTube video contents at the App you are developing now, set version value as 2.

<Using JavaScript>

var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer" };
swfobject.embedSWF("http://www.youtube.com/v/udbATLiDcZk?version=2&enablejsapi=1&autohide=1&playerapiid=ytplayer","ytapiplayer", "425", "356", "5", null, null, params, atts);

<Directly Using HTML>

<object type="application/x-shockwave-flash" id="myytplayer" data="https://www.youtube.com/v/u1zgFlCw8Aw?enablejsapi=1&version=2&playerapiid=ytplayer"
width="640" height="360">
  <param name="allowScriptAccess" value="always">
  <param name="bgcolor" value="#cccccc">
</object>