You can also run the emulator as a desktop application, download and install the specific OS package from the latest release. More information visit: Desktop Application For that you can use Apache, IIS or any simpler web server, but please note that starting from Chrome version 92, the emulator web app will require to be hosted with COOP and COEP custom headers to allow isolation and enable usage of ShareArrayBuffer. The application cannot be run as pure HTML page, because some functionalities used by the emulator have security restrictions on the browser engine, so you will need a web server to run it. This repository provides a sample web appplication for testing the emulator, located under the app folder. postMessage ( "getVersion" ) // Web Worker Callback function receiveMessage ( event ) Web Application addEventListener ( "message", receiveMessage ) brsWorker. Initialize Worker let brsWorker = new Worker ( "node_modules/brs-emu/app/lib/brsEmu.js" ) brsWorker. The brs-emu project is published as a node package, so use npm: If you just want to try the emulator, not installing or downloading anything, then simply try the demo website at: Installation The Electron app source code and documentation is available in another repository, located at.
The desktop app, introduces several aditional features, such as the full screen support, ECP (External Control Protocol) and Remote Console servers to allow integration with 3rd party development tools like the VSCode BrightScript Extension. In addition to the included sample web application, every release also includes a multi-platform desktop application (Windows, Linux & macOS) that uses the same library generated by this project. The BrightScript 2D API Emulator is a full client-side library, nothing is sent or processed in the server side.
This emulator is bundled as a Webpack Javascript library that runs as a Web Worker, and it uses features like SharedArrayBuffer and OffScreenCanvas, that are bleeding edge in the browser engines implementation, because of that, at this moment, it can only be executed in Chromium based browsers, like Chrome, Brave, Opera, Edge or embedded on an Electron application. Note: Although brs-emu runs channels with user interface, it has no intention of emulating the full Roku OS user interface, see Current Limitations page for full details on what is out of scope. This library extends brs, a command line interpreter for BrightScript language, by implementing the Draw 2D API components ( roScreen, roCompositor, roRegion, etc.) and several other BrightScript components allowing a full channel execution over an HTML5 Canvas, including emulation of the Roku remote control. An emulator for the Roku BrightScript language that runs on Chromium based browsers and Electron applications.