Introduction to Applets

Have more questions? Submit a request

What is Applet (aka universal HTML5 Player)

The Applet is an HTML5/Javascript application that runs on top of the signageOS Core App. Applet can leverage the Applet JS SDK for easy access to the device’s native functions like saving files into internal memory and using accelerated video playback, among others.

signageOS ("sOS") provides a unification SDK for running the same Applet on any of the supported devices. With Applet, you maintain a single codebase for your content playout. 

 

mceclip0.png

Key features of Applet

Here are some of the great features making your Applet development as effective as possible.

JS SDK

Within Applet we prepared a special Javascript SDK. This JS SDK helps you with basic tasks that are not supported natively by the browser - local file management, accelerated video playback, video inputs playback, and other hardware-specific features and device management features.

JS SDK is designed in a way it will not interfere with any of your code. JS SDK consists of building blocks and functions allowing you to design your logic in the way you want. It's not telling you anything about how to play content or how to schedule your videos.

 

JS SDK Examples

// Saving files into device memory before an initial load
await sos.offline.addFilesSync([
	{
		uri: "https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js",
		uid: "jquery-2.2.4.min.js",
		type: sos.offline.types.javascript,
		flags: [sos.offline.flags.append(document.body)],
	},
]);

// Save video to device storage (https://docs.signageos.io/api/sos-applet-api/#Load_or_Save_specific_file_into_internal_memory)
const { filePath } = await sos.offline.cache.loadOrSaveFile('intro-video', 'https://2.signageos.io/assets/video-test-1_e07fc21a7a72e3d33478243bd75d7743.mp4');

// Play videos with accelerated video players (https://docs.signageos.io/api/sos-applet-api/#Play_video)
await sos.video.play(...videoArguments);
await sos.video.stop(...videoArguments);

Versioning

Applets feature a built-in versioning system allowing you to create an unlimited number of versions and assign it to devices of your choice.

Distribution

signageOS provides you with a safe and secured distribution mechanism. Selected Applet versions can be assigned to selected devices via REST API or Box

On top of that, there are Applet management features in Power Action, allowing you remotely refresh, reload, enable or disable your Applet.

Debugging

With Applets, you get additional debugging options. You can start a remote session via Weinre or connect to the device in the local network from CLI.

Configuration (ENVs)

signageOS allows you to set up a unique Applet configuration for each device. With this mechanism, you can easily assign custom parameters or environmental variable for your Applet.

How to develop your Applet

There are two main methods to develop an Applet that is compatible with the signageOS Core App:

  • signageOS CLI (full-features desktop development), recommended option
  • signageOS Web Editor (quick and easy for lightweight applications)

For both cases, Applet is developed as an HTML5/Javascript application. It allows you to use any common developer approach and utilize your stack.

signageOS CLI

To start working with signageOS CLI is straightforward. Install signageOS CLI onto your PC or Mac and start the development:

npm install @signageos/cli -g
sos --help

  Start Your development with CLI

Continue here

  Use your existing application with CLI

Continue here

signageOS Web Editor (legacy)

Web Editor is available within signageOS Box. You can quickly create a new Applet and build a single-file application. The Web Editor approach is recommended for quick API testing or for the development of lightweight applications like iframe/browser launchers.

Let's check the complete guide on the Web Editor.

 

 

Was this article helpful?
1 out of 1 found this helpful
Share