Tizen TypeScript API References
The Tizen TypeScript API supports extending both the Samsung product API and the Tizen Web Device API to TypeScript language.
The Tizen TypeScript API converts the JavaScript APIs of both the Tizen Web Device API and the Samsung Product API into TypeScript APIs. The Tizen TypeScript API is released via npm. The CommonJS and TypeScript packages of each API are listed in the following table.
Tizen API | CommonJS Package | TypeScript Package |
---|---|---|
Tizen Web Device API | tizen-common-web | @types/tizen-common-web |
Samsung Product API | tizen-tv-webapis | @types/tizen-tv-webapis |
Table 1. Npm Packages of Each Tizen API
Package List
Package | Description | NPM | Github |
---|---|---|---|
create-tizen-app | A cli tool for setting up Tizen web projects with language, bundler, editors' extension and WITs |
npm | github |
tizen-common-web | A CommonJS API of the Tizen Web Device API | npm | github |
@types/tizen-common-web | A TypeScript API of tizen-common-web
|
npm | github |
tizen-tv-webapis | A CommonJS API of the Samsung Product API | npm | github |
@types/tizen-tv-webapis | A TypeScript API of tizen-tv-webapis
|
npm | github |
Table 2. TypeScript Package List
Setting up Project
create-tizen-app recommend
We have released the create-tizen-app package, which is a wizard tool for helping to configure and make a Tizen web application. It is the best solution to create Tizen web applications easily if you are a developer who prefers CommonJS or TypeScript language. The package also supports using the Samsung TV Product API and the Tizen common API as CommonJS or TypeScript APIs.
create-tizen-app supports 4 options. Language (TypeScript/CommonJS), bundler (Webpack/Parcel), extension for editor (VSCode tizentv/Atom tizentv) and WITs.
The create-tizen-app package also save you a lot of time when setting up a development environment. Let's see how it works!
For TypeScript Developer
If you are familiar with TypeScript or want to build with TypeScript, then you need to install all the packages listed in table 1. Check out the sample of tizen-tv-webapis and the sample of tizen-common-web.
For CommonJS Developer
If you are familiar with CommonJS (node developer), then you just need to install the CommonJS packages. Check out the sample of tizen-common-web and the sample of tizen-tv-webapis for details.
API
Tizen Web Device API
API | Description | Since |
---|---|---|
Application | Access information about currently running and installed applications, and control the applications. |
1.0 |
Content | Discover multimedia content, such as images, videos, and music, on the device. |
2.0 |
Filesystem | Access the files and directories in the device file system. |
1.0 |
Package | Install and uninstall packages, and retrieve information about installed packages. |
2.1 |
Tizen | Access basic definitions used in the Tizen Web Device API. | 1.0 |
TVAudioControl | Control the TV audio. | 2.3 |
TVDisplayControl | Manage stereoscopic 3D effects for TV signals. | 2.3 |
TVInfo | Get information about TV setting. | 2.4 |
TVInputDevice | Handle key presses from input devices, such as a remote control. | 2.3 |
TVWindow | Control TV windows, such as a PiP window. | 2.3 |
SystemInfo | Retrieve information about device capabilities, such as the display, network, and storage. |
1.0 |
Table 3. Supported TypeScript API of Tizen Web Device API
Samsung Product API
We support TypeScript APIs of the entire Samsung Product APIs. If you got any problems, please report your issue to our repository.
API | Description | Since |
---|---|---|
WebAPI | Access the basic definitions used in the Samsung Product API for Smart TVs. |
2.3 |
AdInfo | Retrieve advertising identifier information. | 2.4 |
AppCommon | Switch the screensaver on and off. | 2.3 |
ASFService | Share media content between DLNA-certified devices by initializing and using the AllShare Framework. Retrieve a list of discovered AllShare devices with a Specified ID or information about media files and folders, such as the file extension and size, and content duration. |
2.3 |
AVInfo | Retrieve information about the screen and audio modes of the TV. You can also set the widescreen mode. |
2.3 |
AVPlay | Implement audio and video playback. | 2.3 |
Billing | Develop a billing system for your application, to allow users to make purchases within your application. |
2.4 |
Microphone | Manage a microphone connected to the TV. | 2.3 |
Network | Access information about the network connection and connection-related events. |
2.3 |
Preview | Use Smart Hub Preview to show deep links to application content. |
2.3 |
ProductInfo | Retrieve information about the TV, such as the device unique ID (DUID), and the model code. You can also retrieve and set system configuration parameters. |
2.3 |
Sso | Access the single sign-on (SSO) features. | 2.3 |
TvInfo | Manage the TV settings. | 2.3 |
WidgetData | Store data in the application secure storage. | 2.3 |
Table 4. Samsung TV Product APIs
More Information
If you are unfamiliar with TypeScript, learn more at What is TypeScript?.