@creative-realities/rvhost
TypeScript icon, indicating that this package has built-in type declarations

3.2.5 • Public • Published
# RVHost 3.2.5

An API for the CRI ReflectView player ecosystem.

Updates

getContentSnapshot implementation

Features

  • Support for BrightSign, Android, and Windows Chromium.
  • Bundle types include - Modern, Commonjs, ESM, and UMD.
  • Includes the RVPopup and RVInactive Timeout API's.
  • Full player specific unit testing.
  • Written in Typescript | Supports Typescript.

Installation & Setup

Install by running: npm -i @creative-realities/rvhost

Setup by running:

import RVHost from 'rvhost3';

const rvhost = RVHost.getRVHost()

Usage & Configuration

RVHost exposes a singleton class that allows you to interact with the ReflectView player. You first need to gain access to this instance by calling the getRVHost() method. Storing this instance on a property you can then check to see if the API is exposed (See above Installation and Setup). To see if your running browser has the ReflectView RVHost API exposed, check to see if the property isRunnable is true.

const rvHost = RVHost.getRVHost()
if (rvHost.isRunnable) {
	... interface with the API methods here.
}

Unit Testing (added in minor 3.1.0)

Run pnpm test:unit to run unit tests. The BrightSign platform is tested by default. Android and Chromium may be tested by changing testPlatform to "Android" or "Chromium" and re-running the tests.

Build

The package uses microbundlejs to build the javacript library. After cloning the repo from source and installing with your favorite package manager, simply run the package.json build command. A lib folder will be created with all the different bundle types along with the typescript declaration file.

Supported API's

  • getHostInfo : Get the host info the player.
  • getLocationInfo : Get the location info of the player.
  • getClassifications : Get any location classifications setup for the player in publisher.
  • getContentSnapshot : Get a snapshot of valid content for a specified channel on the player.
  • getChannelClassifications : Get the specified classifications for the given channel.
  • getChannelContainers : Get the related guids for available containers on the player.
  • getFeedChannelContainers : Get the related guids for available feed containers on the player. You can get this by either provided the feed instance UID or by the feed channel name.
  • getContainer : Get the container for the specified channel and guid on the player.
  • getInstanceProperties : Get the instance properties provided by any defined properties from ReflectView Publisher.
  • exit : Exit the current browser instance.
  • log : log a string or stringified object to the player logs.

Configurable API's

  • Popup API : Advanced API for handling player popups.

Package Sidebar

Install

npm i @creative-realities/rvhost

Weekly Downloads

145

Version

3.2.5

License

MIT

Unpacked Size

105 kB

Total Files

9

Last publish

Collaborators

  • leifworkmaster
  • adrian_cri
  • adamlockhart