@stripchatdev/ext-helper
v0.1.34
Published
SDK for building extensions on the Stripchat Extension Platform. Provides typed methods for context, events, settings, whisper messaging, and backend actions — all from inside sandboxed iframes.
Readme
@stripchatdev/ext-helper
SDK for building extensions on the Stripchat Extension Platform. Provides typed methods for context, events, settings, whisper messaging, and backend actions — all from inside sandboxed iframes.
Installation
npm install @stripchatdev/ext-helperQuick Start
Call createExtHelper() once at the entry point of each page:
import {createExtHelper} from '@stripchatdev/ext-helper';
const ext = createExtHelper();Make requests
const ctx = await ext.makeRequest('v1.ext.context.get', null);Subscribe to events
ext.subscribe('v1.ext.context.updated', ({context}) => {
// handle context update
});Send a whisper to other slots
await ext.makeRequest('v1.ext.whisper.local', {
data: {type: 'READY'},
});Call a backend action
const result = await ext.makeRequest('v1.ext.actions.call', {
actionName: 'stopDevice',
params: {deviceId: 'dev_456', token: 'tok_abc'},
});TypeScript
Full type definitions are included. You get autocompletion and type safety for all methods and events out of the box.
Documentation
For the full guide — manifest setup, slots, resolver scripts, settings, communication, and more — see the Extension Platform Documentation.
Browser Support
- Chrome 91+
- Firefox 90+
- Safari 15+
- Edge 91+
