Player APIs (BrightScript & Ja...
JavaScript APIs

usbfilesystem

5min
the usbfilesystem object allows supported brightsign players to expose a local file as a usb mass storage device when connected to a usb host port on another device (for example, a pc or television ) the host acts as if it is talking to a usb thumb drive or usb hard drive, but the reads and writes go to the specified local file on the brightsign normally the local file would be prepared beforehand with a filesystem offline or using filesysteminfile docid\ keg9zrljkkjk2dfhpjx65 on the player itself brightsign players with usb c (except for ls3 and ls4) can use this object usbfilesystem idl interface usbfilesystem { constructor(); promise\<void> enable(string filename); promise\<void> disable(); }; object creation to create a usbfilesystem object, load the @brightsign/usbfilesystem module using the require() method var filesystemclass = require('@brightsign/usbfilesystem'); var usbfilesystem = new filesystemclass(); usbfilesystem enable() promise\<void> enable(string filename) exposes an existing filesystem image as a usb mass storage device filename string string the name of the file to expose as a usb mass storage device disable() promise\<void> disable() removes an existing filesystem image as a usb mass storage device example var filesystemclass = require('@brightsign/usbfilesystem'); var usbfilesystem = new filesystemclass(); // additional description using filesysteminfile will help build a img file // mount an already built filesystem image usbfilesystem enable("/storage/sd/usbstore img") then(function (result) { console log("successfully mounted!"); }) catch(function(err) { console log(json stringify(err)); }); // unmount a filesystem image usbfilesystem disable() then(function() { console log("successfully unmounted"); }) catch(function(err) { console log( json stringify(err) ); });