Emulator in CLI and Box

Have more questions? Submit a request

Emulator is a web-based application which emulates the behavior of physical devices and the signageOS JS APIs.

Its purpose is to allow you quickly test the APIs and run your Applet in the "device-like" environment.

Due to it's web-based nature, Emulator comes with certain limitations documented below.

General limitations

Below is the list of general limitations of the Emulator. These features will not provide any feedback or response. All other features in Applet JS API and REST API are available and the Emulator will provide sufficient feedback that can be used for development and be debugging.

Emulator limitation on Chrome 72+

If you update your Chrome to the latest version 72+ the Emulator might stop working for you. The reason is behind the Chrome security policy which disallow certain iframe communication.

In certain cases older version of chrome (49) will be necessary to download, in that case you can download it from here

Please install older version of Chrome/Chromium until the new Emulator will be released. Links to older version are below:

 

OS link
Linux link
macOS link
Windows 64-bit link

List of features and limitations in the Emulator

 

Feature/Capability State Note
SCREENSHOT_UPLOAD Emulated Returns only blue screen png image
MODEL Emulated Based on navigator.platform
SERIAL_NUMBER Emulated Based on userAgent
TIMERS_PROPRIETARY Emulated Creates black overlay
TIMERS_NATIVE Emulated Creates black overlay
STORAGE_UNITS Emulated Only Internal storage units are supported
SYSTEM_REBOOT Emulated Refresh browser window
APP_RESTART Emulated Refresh browser window
SET_VOLUME Emulated Works only for video playback via sos.video JS API
SET_BRIGHTNESS Emulated Adds overlay with transparency to lighten/darken the content
DISPLAY_POWER Emulated Adds black overlay
APP_UPGRADE Emulated Changes URL in the browser window to correct/new URL
SCREEN_RESIZE Emulated Only supports change of orientation, not for resolution
NETWORK_INFO Emulated Emulated based on the userAgent or what Chrome allows
PROXIMITY_SENSOR Emulated Activated with mouse movement over the Emulator window
FACTORY_RESET Emulated Deletes all files in cache, internal file storage and refresh browser window
FIRMWARE_UPGRADE Emulated Internally set new FW version, refresh borwser window and report back new FW
FILE_SYSTEM_FILE_CHECKSUM Emulated Works only on smaller files, based on browser performance
WIFI Emulated Pre-defined list of fake Wifi networks to connect to
WIFI_SCAN Emulated Returns pre-defined list of Wifi networks (listed below the table)
VIDEO_4K Emulated Works on good enough PCs
monitors IMonitors Emulated Determnistic based on window.navigator
manufacturer - this.window.navigator.vendor || this.window.navigator.appCodeName, // firefox doesn't have vendor
model - this.window.navigator.userAgent
serial - this.window.navigator.productSub
firmware - this.window.navigator.appVersion
SET_TIME N/A Throws Exception
REMOTE_CONTROL N/A Throws Exception

 

List of emulated wifi networks

 

Wifi SSID Is protected? Password Encryption
School true uni12345 WPA2 Enterprise
Work true happy1234 WPA2 Enterprise
BrownsWifi false -- --
SmithsWifi true unsecure9876 WEP
JaneAndroid true hihi5678 WPA2 Personal
Chris's Phone true hello5678 WPA

Autoplay policy in Chrome 66+

If you’re experiencing trouble with playing videos while using Chrome version 66 or newer, it’s possible that the video playback is being blocked by the browser.

One of the new features in Chrome 66 is that by default, the user must interact with the website first or the browser will prevent any video playback with audio enabled. This is acceptable for regular websites, but not for digital signage devices.

To fix this, follow these steps:

  1. Open chrome://flags/#autoplay-policy
  2. Set Autoplay policy to No user gesture is required
  3. Relaunch Chrome

You can read more about it in this blog post.

Adblock issue in Chrome

It may happen that the video won't be displayed in the emulator due to Adblock app running in the Chrome browser background. It can cause the unexpected exception error which blocks automatically the video content in the browser media player.

unexpected_exception_error.png

The following media content is set up as a suspicious one by default in the Adblock settings.

adblock_blocked_content.png

So what should you do in this situation?

adblock_issue_wtd.png

All you have to do is cancel blocking of media content in the Adblock setting.

adblock_stop_blocking.png

File Management Limitation

Files are stored in the browser’s Local Storage only if they are smaller than 10kb. Otherwise, they are served by the original URL.

If you want to check the content stored in the internal device memory you can do it by running the following command in the Chrome browser: filesystem:https://2.signageos.io/persistent/
Please note that this feature only works in the Box emulators.

Video codecs support in Chromium

If you use Chromium to run the Emulator, you might experience an issue while playing videos. Chromium by default supports only the open video codecs read more here.

Chromium does not support MP4 with H.264 codec! Use different format while using Chromium as your Emulator.

FAQ

What should I do in the case of the emulator doesn't display the applet content, not only in Chrome but Firefox and IE / Microsoft Edge as well?

There are some common rules which may apply to all popular browser in such a situation

  • Don't click to emulator (browser) window before it starts play video.

  • There is some browsers policy, which may blocks the applet content.
    Kindly refer to the autoplay policy in Chrome

  • Some browsers have limitations on a number of accesses to internal memory (used internally to emulate file system). Some browsers need to be turned off and on again after a while.

  • Check the video format if it's supported by the emulator. We recommend testing integration on a subset of videos for emulator purpose.
    Kindly refer to the video codecs support in Chromium

  • Some browsers have also some limitations on the file size in the internal file system (unpredictable limit).

  • It's always better to test smaller videos in Emulator.

  • If there is a specific error message displayed, refer to the js API methods / events and the code errors common for the specific action.
    JS Video functions

  • All media files should be served from the internal memory storage.
    More information on File System and Offline Cache for media files

  • We use some 'browser listeners' which inform about the errors related to the applet emulator content. So if the video file loads and plays properly but there are some information errors on the memory leak, it's not the technical issue on the signageOS side.

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