Samples

Check out the sample apps on GitHub that will help accelerate your app development.

Accessibility

This sample app shows how to get the value of accessibility settings.

App lifecycle

This sample app shows how the state of an app is changed by each launch-related event.

Back button control

This sample app demonstrates how the app screen moves with the back button of the Magic Remote control unit. You can examine the difference by the disableBackHistoryAPI value of appinfo.json.

Database (DB8)

This sample app shows how to create a kind, an object that can be considered a table, using putKind() method.

Hello World Service

This sample app demonstrates how to create a webOS TV service, call the service from a web app, and display the response.

Hosted web app

This sample app implements URL redirection to the Google search website using the JavaScript and HTML5 meta tag.

HexGL

This is the source code of HexGL, the futuristic HTML5 racing game by Thibaut Despoulain.

Luna Service

This sample app shows how to call luna service APIs using the webOSTV.js library.

Media Playback

This sample app demonstrates how to implement media playback in a web app.

MRCU Sensor

This sample app demonstrates how to call the Motion Sensor API and check the sensor data.

Multi-Sound

This sample app demonstrates how to play multi-sound in an app with Web Audio API and audio elements.

Portrait mode

This sample app demonstrates how to support portrait mode in an app.

Remote control

This sample app shows how to handle user inputs with the LG Magic Remote. It also shows the keycode received from external input devices.

Resolution

This sample app demonstrates how to get the video and UI resolution in an app using the webOSTV.js library.

Virtual Keyboard

This sample app implements use of the virtual keyboard, the primary text input method of webOS TV app.

Web storage

This sample app implements two different web storage methods: local storage and session storage.

webOSTV.js library

This sample app shows how to use the webOSTV.js library.