Getting Started with Tizen TV Web Apps
This guide explains the basics of Tizen TV web apps.
NOTE: This guide assumes you h...
How to Handle Remote Control Events
To add support for key events, use the document.addEventListener function to connect a...
In the Web Simulator, you can test your app by using mouse, keyboard, or virtual Remote Control input.
You can also launch...
Upcoming SlideShare
Loading in …5
×

Getting Started with Tizen TV Web Apps

629 views

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
629
On SlideShare
0
From Embeds
0
Number of Embeds
52
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Getting Started with Tizen TV Web Apps

  1. 1. Getting Started with Tizen TV Web Apps This guide explains the basics of Tizen TV web apps. NOTE: This guide assumes you have installed the Tizen-based Samsung TV SDK. What is a Tizen TV Web App? A Tizen TV Web App is an HTML5 based application designed for the Tizen TV environment. By using standard technologies like HTML5, JavaScript, and CSS, developers can create rich experiences for the TV platform. The Tizen TV platform provides a JavaScript “web api” to provide TV features to the web applications. HTML5’s video and audio tags provide the cornerstone of the multimedia functions. Figure 1 Apps Are Based on HTML, JS, and CSS Creating a Tizen TV Web App The easiest way to create a new Tizen TV Web App is to use the Tizen-based Samsung TV SDK IDE. Select File > New > Tizen Web Project. You can choose to create a project from the Templates or the Sample projects.
  2. 2. How to Handle Remote Control Events To add support for key events, use the document.addEventListener function to connect a function to the keydown event: //Initialize function var init = function () { // TODO:: Do your initialization job console.log("init() called"); // add eventListener for tizenhwkey document.addEventListener('tizenhwkey', function(e) { if(e.keyName == "back") tizen.application.getCurrentApplication().exit(); }); document.addEventListener('keydown', remoteControlEvent); }; NOTE: Your event handling function can have any valid JavaScript function name. In this example, the function is named remoteControlEvent. Later in the code, implement the remoteControlEvent function: function remoteControlEvent(e) { console.log("Key Value : " + e.keyCode); switch(e.keyCode){ case 1: //do something case 2: // do something else . . . default: break; } } Testing Your Tizen TV Web App To test your Tizen TV Web App, you can launch it in the Web Simulator. To launch the project, right-click on it in the IDE and choose Run As > Tizen TV Web Simulator Application (Samsung TV) Figure 2 Launching the Web Simulator
  3. 3. In the Web Simulator, you can test your app by using mouse, keyboard, or virtual Remote Control input. You can also launch the Debugger tool: Figure 3 The Debugger

×