Skip to end of metadata
Go to start of metadata
Please note that this article refers to older Presto-based versions of the Vewd products ( Vewd Core3.x). These versions are still live in a lot of devices that are active in all markets, but most devices shipped since 2015 are based on the newer Blink-based Vewd product.

This guide has been updated to cover the Vewd TV Emulator 3.4. For previous versions of the emulator, please refer to the documentation contained inside the emulator’s .zip package.

About the Vewd TV Emulator

The Vewd TV Emulator allows a web developer to test HTML5 and CE-HTML content for TVs and other appliances running the  Vewd Core, as well as HTML-based apps for the Vewd App Store. It comes packaged as an Oracle VirtualBox image and can be run on Windows, Mac and Linux.

Installation

The Vewd TV Emulator is provided as a preconfigured Oracle VirtualBox machine and disk image. This ensures a test environment for web developers that is as close to a real device as possible. To use the emulator:

  1. Install the Oracle VirtualBox application.
  2. Download the  Vewd TV Emulator package.
  3. Extract the package to an appropriate folder on your development machine.
  4. Open the .vbox file from the package. This will automatically add the virtual machine to the Oracle VirtualBox Manager and start the emulator.

Image: The Vewd TV Emulator .vbox and .vdi files from the extracted package

You can also install the emulator from within the VirtualBox Manager itself: From the Machine menu, choose Add and open the .vbox file.

Some Linux distributions already ship with an open source version of VirtualBox. The Vewd TV Emulator package was specifically developed for the Oracle VirtualBox binary version, and may not work reliably with any other version.

The Vewd TV Emulator start page

The Vewd TV Emulator is, in essence, a self-contained generic web browser, equivalent to what you would find on devices running the  Vewd Core. In addition, the emulator contains specific functionality that is only present in Vewd App Store client application.

Image: The Vewd TV Emulator start page

The emulator’s start page — itself just a web page — provides a direct link to the Vewd App Store demo server at http://demo.tvstore.opera.com. This demo store can be used to test apps for the Vewd App Store. For more information, see our article on Testing your app inside the Vewd App Store.

Installing the H.264 codec

For legal reasons, the Vewd TV Emulator does not come with any H.264 codec pre-installed. As this codec is widely used for TV apps, you will need to install it the first time you run the emulator.

Image: The H.264 codec installation prompt on the Vewd TV Emulator start page

To do this, simply choose the Install option on the start page. This will download the necessary codec, install it, and restart emulator.

For information about the specific multimedia formats that can be used, refer to the article on HTML5 audio/video support in Vewd App Store applications.

Navigation

Although the Vewd TV Emulator can be used with a mouse, this will not provide the same user experience as the real TV browser and Vewd App Store client. Instead of using on-screen mouse pointers, users navigate by using directional keys on their remote controls to select different focusable page elements (buttons, links, and so on). For a more accurate emulation, there are two alternative control mechanisms that simulate a real device’s remote control interface, outlined below:

Keyboard

The emulator uses the following keyboard controls:

  • F1 shows/hides the browser navigation bar
  • ←↑→↓ cursor keys move the focus
  • 0-9 number keys
  • Enter activates the currently focused element
  • Backspace maps to the Return/Back key
  • F5 reload the current page
  • F10 restart the browser
  • ESC close current tab, open a fresh about:blank tab

Web-based remote

In addition to basic keyboard controls, the Vewd TV Emulator also provides a more comprehensive web-based remote control that also simulates the colored keys (red, green, yellow, blue) and a set of media controls (play/pause, stop, rewind, fast-forward).

Image: The Vewd TV Emulator’s web-based remote control on localhost:5555

When the emulator is running, the Oracle VirtualBox machine is configured to expose a local server on the host machine on port 5555. To access the web-based remote, simply launch your regular browser on the development machine and point it to http://localhost:5555.

Image: VirtualBox’s settings for Port Forwarding

In order to use the web-based remote control, ensure that no other application is currently running on your development machine using port 5555. If this is not possible, you can change the port number used by the VirtualBox machine by going to the Network section in the machine’s settings and modifying the Port Forwarding host port.

Accessing local files

The Vewd TV Emulator runs as a completely separate Linux-based system on your development machine. To access files hosted on your development machine for testing, there are two options:

1) Running a local server

If you have a server (such as the Apache HTTP Server) running on your development machine, note that it is not possible to access it from within the emulator by just using the standard http://localhostaddress, as localhost in this context refers to the emulator’s environment itself.

Image: Running WAMP as a local server on the machine: in a browser on the host environment, the server can simply be accessed from http://localhost.
In the Vewd TV Emulator, the IP address of the host machine itself has to be used

Instead, you should use the IP address of your development machine; the emulator will then establish a connection to your server from within the virtual machine.

2) Shared folders

Image: VirtualBox’s setup for Shared Folders

Particularly for static files that do not require any server-side functionality, another option is to add a local folder on your development machine as a shared folder inside the emulator’s Linux environment. This can be done from the Oracle VirtualBox Manager:

  1. Make sure the Vewd TV Emulator is not currently running
  2. Go to the emulator’s Settings… (either by right-clicking on the emulator or from the machine menu)
  3. In the Shared Folders section, add your local folder, making sure the Auto-mount option is checked

Image: The Vewd TV Emulator, showing the shared folder being displayed from the relevant file://localhost/mydata location

Your shared folder will be available under file://localhost/mydata/sf_[name of your folder]the next time you start the emulator.

Debugging with Opera Dragonfly

A standard debugging setup: Vewd TV Emulator, a browser showing the web-based remote control, and an undocked Opera Dragonfly window set to remotely debug the emulator

Opera Dragonfly is a comprehensive set of web developer tools integrated with the Opera desktop browser. Using the remote debugging functionality of Opera Dragonfly, it is possible to debug web pages and apps running in the Vewd TV Emulator:

  1. Set Opera Dragonfly to listen for incoming remote debugging connections.
  2. Press the Connect to Dragonfly button on the emulator’s web-based remote control.

Image: The web remote control’s Connect to Dragonfly button

Note that using the Connect to Dragonfly button is the only way to establish a remote debugging connection. Entering opera:debug in the Vewd TV Emulator’s address bar will not work.

Image: Opera Dragonfly’s Debugging Context button

When the connection is established, make sure that the debugging context is set to the web page or app that you want to debug, rather than the Vewd TV Emulator’s status page or navigation bar.

For more information, refer to the Opera Dragonfly documentation.

Settings

The Vewd TV Emulator offers a few customisation options that can be configured via the Settings button on the web remote control.

The web-based remote control, showing the settings popup dialog

Image: The web-based remote control, showing the settings pop-up dialog

General

  • TV Emulator version: Some emulator packages can contain a series of different Vewd Core versions. You can switch between them with this dropdown.
  • Enable TV Store profile: The Vewd App Store features a few customisations (such as custom VK_ key constants in the global JavaScript namespace) not present in the standard Vewd Core. If you are developing or testing Vewd App Store apps, check this option.
  • Default URL: The URL that will be loaded when the emulator is launched.
  • Screen resolution: The screen resolution of the Vewd TV Emulator.

Debug

  • Opera Dragonfly listening IP/port: For the purposes of Opera Dragonfly debugging, it is possible to set a different IP and port from the default. Generally, you should not need to change these.

Memory

  • Alloc limit/Heap limit: These are advanced options that let you control the memory available for the TV Emulator. These options may be useful when you want to emulate a device with limited memory.

Browsing Data

  • Clear cache / Clear history: These buttons clear the cache or history immediately, without having to save or apply the settings.

Proxy

  • HTTP/HTTPS proxy: Define the address of any proxies required to make HTTP/HTTPS connections from your development machine.

Other

  • Allow file and cross-domain XMLHttpRequests: For security reasons, most browsers block XMLHttpRequests to external domains and local files by default. However, for testing purposes (for instance, if your app is not yet deployed to its production server) you can set the emulator to allow these requests.
  • Performance adjustment: You can throttle the performance of the emulator to more closely simulate low-power devices.
  • HTTP Accept Language: If your app does content negotiation based on language headers, this option lets you define the default HTTP Accept Language header that is sent with each request.

To immediately apply changes, choose Apply — this will store the settings and restart the emulator. Using Save will store the new settings, but these will only take effect the next time the emulator is restarted.

Closing the emulator

Image: VirtualBox’s Close Virtual Machine dialog, with the “Send the shutdown signal” option checked

When closing the emulator, please choose the Send the shutdown signal option. This will ensure that the Linux environment in the emulator is properly powered down.

Support

Vewd does not provide any official support for the Vewd TV Emulator. However, a number of communication channels are available:

  • No labels