liveryvideo / interactive-bridge

Bridge for communicating between a Livery Video Player and the interactive layer page shown within that.

Home Page:https://interactive.liveryvideo.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Livery Video Interactive Bridge

npm package conventional CHANGELOG tsdoc API docsify Documentation Lit Elements license MIT

Bridge for communicating between a Livery Video Player and the interactive layer page shown within that.

Please refer to our docs page for further information.

You can also view the CHANGELOG and API documentation that are included in this NPM package from there.

Installation

npm install @liveryvideo/interactive-bridge

Usage

The main class to be used from this package is the InteractiveBridge:

import { InteractiveBridge } from '@liveryvideo/interactive-bridge';
// The playerBridge will be provided to you as interactive element as interactive webview or iframe
const bridge = new InteractiveBridge(playerBridge || '*');
// To prevent cross site security issues:
// https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#security_concerns
// replace the `'*'` origin above with the origin of the page that the Livery Player is on
bridge.getAppName().then(appName => window.alert(`appName: ${appName}`));

About

Bridge for communicating between a Livery Video Player and the interactive layer page shown within that.

https://interactive.liveryvideo.com

License:MIT License


Languages

Language:TypeScript 90.8%Language:JavaScript 7.3%Language:HTML 1.8%Language:Shell 0.2%