0.9.1 • Published 11 months ago
@raydiant/sdk v0.9.1
Raydiant SDK
A JavaScript library for interacting with the Raydiant runtime.
Installation
NPM
npm install @raydiant/sdk
# or yarn
yarn install @raydiant/sdk
import { runtime, devTools } from '@raydiant/sdk';
CDN
<script src="https://cdn.raydiant.com/lib/raydiant-sdk@0.9.0.min.js"></script>
const { runtime, devTools } = window.Raydiant;
Usage
// Send 'ready' event.
runtime.ready();
// Send 'complete' event.
runtime.complete();
// Send 'complete' event with error.
runtime.complete(new Error());
// Subscribe to the runtime's 'play' event.
const unsubscribe = runtime.subscribe('play', () => {
// ...
});
Developer Tools
Use the built-in developer tools to simulate sending and receiving events in local development. When you open your app directly in the browser the dev tools are automatically enabled.
// Check if dev tools are enabled.
devTools.isEnabled();
// Simulate receiving 'play' from the playlist runtime.
devTools.play();
// Immediately call play again after complete, simulating a single presentation in the playlist.
devTools.play(true);
// Stop looping.
devTools.disableLoop();
Contributing
See CONTRIBUTING.md for instructions on how to contribute to the Raydiant SDK.
0.9.1
11 months ago
0.9.0
1 year ago
0.8.1
1 year ago
0.8.0
1 year ago
0.7.1
1 year ago
0.6.0-canary-10131044
2 years ago
0.7.0
2 years ago
0.6.1
2 years ago
0.6.0-canary-10131113
2 years ago
0.6.0
2 years ago
0.5.0
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.3
3 years ago
0.3.2
3 years ago
0.3.1
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
0.0.0
3 years ago