Getting Started

Estimated reading time: 4 minutes

This “HTML5 Application” part describes how to develop, install and run a HTML5 application on BRAVIA Professional Display.

First, this part describes the basic information of application packaging to launch simple applications from an USB storage. The supported formats are FAT32, NTFS and exFAT.

Application Packaging

Files and Directories Structure

A HTML5 application must be using the following rule for files and directories structure.

USB: /sony/
          +--- autorun.txt
          +--- apps/webapps/
                           +--- <application_name_1>/app/ // Application Directory
                                                        +--- manifest.json
                                                        +--- <resource>/
                                                                       +--- <static_files>
                           +--- <application_name_2>/app/ // Application Directory
                                                        +--- manifest.json
                                                        +--- <resource>/
                                                                       +--- <static_files>
                           :
     /media/
           + video1.mp4
           + video2.mp4
           :

Any directory name can be accepted for application names, and one or more applications can be stored under /sony/apps/webapps/ directory. In addition, you can store static files like *.html, *.js, *.css or *.png under /sony/apps/webapps/<application_name>/app/<resource>/, and you can access them via file://localhost/<resource>/<static_files>. When you store the all of application files in an USB storage, the application can work without a network connection. It works as an offline application.

autorun.txt

autorun.txt contains an auid to specify an application to launch. The application must be stored in /sony/apps/webapps/ directory. The following is a minimum example of autorun.txt.

{
  "auid": "net.sony.tv.sample.manifestjson_weburl"
}

autorun.txt can also define an application action (launch/copy/remove) when BRAVIA Professional Display detects an application directory.

Please visit autorun.txt for the details of autorun.txt.

manifest.json

The manifest file manifest.json contains application information like auid (Application Unique ID), title, splash image, initial URL, etc. The Manifest filename must be "manifest.json". The following is an example of manifest.json.

{
  "name": {
    "default": "en_US",
    "en_US": "[Sample] Launch from web_url"
  },
  "auid": "net.sony.tv.sample.manifestjson_weburl",
  "version": "1.0",
  "manifest_version": "1.0",
  "app": {
    "launch": {
      "web_url": "https://example.com/myapp"
    }
  },
  "splash": "splash.jpg",
  "minimum_web_platform_version": "1.0"
}

Please visit manifest.json for the details of manifest.json.

Run an Application from an USB Storage

Case 1. Show a Web Site

Please download and extract a sample application. After extracting, put files as follows. Please download and extract it. And put files as below.

USB: /sony/
          +--- autorun.txt
          +--- apps/webapps/manifestjson_weburl/app/manifest.json

To launch, set an application from a USB the the following steps.

  1. In manifest.json, set the "web_url" property. The following example will show "https://example.com/" when launching an application.
    {
     "name": {
       "default": "en_US",
       "en_US": "[Sample] Launch from web_url"
     },
     "auid": "net.sony.tv.sample.manifestjson_weburl",
     "version": "1.0",
     "manifest_version": "1.0",
     "app": {
       "launch": {
         "web_url": "https://example.com/"
       }
     },
     "minimum_web_platform_version": "1.0"
    }
    
  2. Copy 'sony' directory to the root directory of the USB storage.
  3. Connect the USB storage to BRAVIA Professional Display. The application will be launched and show a web site of "web_url" automatically.

Case 2. Launch a Local Application

Please download and extract a sample application. After extracting, put files as follows. And put files as below.
This sample does not include video.mp4 to be played, so you need to put a video content video.mp4 in /sony/apps/webapps/manifestjson_localpath/app/doc/ yourself.

USB: /sony/
          +--- autorun.txt
          +--- apps/webapps/manifestjson_localpath/app/
                                                      +--- manifest.json
                                                      +--- doc/
                                                              +--- index.html // Initial Page
                                                              +--- video.mp4 // Please put your sample file

To launch an application from a USB storage, do the following steps.

  1. In manifest.json, set the "local_path" property. The following example will show “doc/index.html” when launching an application.
    {
     "name": {
       "default": "en_US",
       "en_US": "[Sample] Launch from local_path"
     },
     "auid": "net.sony.tv.sample.manifestjson_localpath",
     "version": "1.0",
     "manifest_version": "1.0",
     "app": {
       "launch": {
         "local_path": "file://localhost/doc/index.html"
       }
     }
    }
    
  2. Copy the 'sony' directory to the root directory of a USB storage.
  3. Copy your video.mp4 to /sony/apps/webapps/manifestjson_localpath/app/doc/. Please visit AV Media Formats for the details of the supported audio/video media format.
  4. Connect the USB storage to BRAVIA Professional Display. The application will be launched and show an application top page "local_path".

You can launch your HTML5 application by replacing the local_path property with your developed file.

Last modified: 27 Feb 2019