UNPKG

@gobistories/gobi-web-integration

Version:

This library will let you put your Gobi stories on your site.

82 lines (81 loc) 2.44 kB
import { GobiController } from '../utils/controller'; import { Story } from './story.types'; export interface Options { container?: string | Element; color?: string; animatedBubble?: boolean; bubbleSize?: string; showPlayIcon?: boolean; playIconUrl?: string; hideTitle?: boolean; wrap?: boolean; scroll?: boolean; isFullHeightMobile?: boolean; align?: 'left' | 'right' | 'end' | 'start' | 'center' | 'space-between' | 'space-around'; autoSegue?: boolean; stories?: Array<StoryOptions>; renders?: Story[]; showEmptyStories?: boolean; openInPlayerPage?: boolean; fullScreenPlayer?: boolean; fullScreenMode?: boolean; closeModalOnStoryEnd?: boolean; noShade?: boolean; zIndex?: number; disableShadowDom?: boolean; disableAnalytics?: boolean; inheritTextStyles?: boolean; inheritTextFontFamily?: boolean; on?: { loaded?: (controller?: GobiController) => void; close?: () => void; open?: (storyId: string) => false | void; }; titleFontSize?: string; titleFontColor?: string; titleFontFamily?: string; titleFontWeight?: string; apiBaseUrl: string; useMediaProxy: boolean; mediaProxyHost: string; previewMode: boolean; collectionId?: string; playerOptions: Partial<PlayerOptions>; size?: number; playColor?: string; gap?: string; animatedCovers?: boolean; playInline?: boolean; } export interface PlayerOptions { id?: number; container?: string; autoStart: boolean; autoStartWithSound: boolean; savePosition: boolean; loop: boolean; width: number; height: number; roundedCorners: boolean; shadow: boolean; storyId?: string; checkViewPort: boolean; playButton: boolean; transcriptButton: boolean; on?: Partial<Callbacks>; apiBaseUrl: string; useMediaProxy: boolean; mediaProxyHost: string; } export interface StoryOptions { id: string; thumbnailUrl?: string; bubbleSrc?: string; title?: string; } export declare type EmbedType = 'bubbles' | 'cards'; export interface CollectionOptions extends Options { embedType: EmbedType; } export declare type CallbackName = 'videoPlay' | 'videoPause' | 'videoComplete' | 'close' | 'clickPrevious' | 'clickNext' | 'newIteration' | 'error' | 'loaded'; export declare type Callbacks = Record<CallbackName, (...args: any[]) => void>;