UNPKG

@gobistories/gobi-web-integration

Version:

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

108 lines (107 loc) 2.95 kB
export declare type MediaType = 'video' | 'image'; export declare type StickerType = 'DUMB' | 'TEXT' | 'LINK'; export declare const ValidStickerTypes: string[]; export declare type StickerTextAlign = 'start' | 'center' | 'end'; export declare type StickerTextContrastMode = 'normal' | 'fill' | 'border' | 'background'; declare type StickerTextFontFamily = 'open-sans' | 'roboto' | 'roboto-mono' | 'roboto-light' | 'bebas-neue'; export interface Sticker { type: StickerType; order: number; x: number; y: number; startOffset: number | null; endOffset: number | null; scale: number; rotation: number; imageUrl: string | null; linkUrl: string | null; text: string | null; textBold: boolean; textItalic: boolean; textUnderline: boolean; textAlign: StickerTextAlign; textPrimaryColor: string; textSecondaryColor: string; textContrastMode: StickerTextContrastMode; textFontSize: number; textFillOpaque: boolean; textFontFamily: StickerTextFontFamily; customFontUrl?: string; start: number; end: number; } export interface Subtitle { text: string; startTime: number; endTime: number; } export declare type SubtitleContrastMode = 'normal' | 'fill' | 'border' | 'background'; export declare type SubtitleTheme = { fontFamily: string; primaryColor: string; secondaryColor: string; customFontResourceId: string | null; contrastMode: SubtitleContrastMode; fillOpaque: boolean; posY: number; }; export declare const defaultSubtitleTheme: SubtitleTheme; export interface Chapter { id: string; order: number; duration: number; frameRate?: number; mediaType: MediaType; mediaUrl: string; videoUrl: string; mediaStart: number; mediaEnd: number; stickers: Sticker[]; begin: number; end: number; virtual?: boolean; } export interface Track { src: string; kind: string; srcLang: string; label: string; default: boolean; } export interface Story { viewKey: string; storyId: string; teamId: string; organizationId: string; version: number; title: string; subtitles?: Subtitle[]; subtitleTheme?: SubtitleTheme; subtitleFontUrl?: string; videoUrl: string; streamingUrl?: string; frameRate?: number; thumbnailUrl: string; coverUrl: string; thumbnailAltText: string; coverAltText: string; webmCoverUrl?: string; mp4CoverUrl?: string; animatedThumbnailUrl: string; webmThumbnailUrl?: string; mp4ThumbnailUrl?: string; posterUrl: string; chapters: Chapter[]; overrideThumbnailUrl?: string; whiteLabel?: boolean; logoUrl?: string; logoLinkUrl?: string; posterDataUrl?: string; transcriptUrl?: string; volume: number; musicUrl?: string; musicVolume: number; tracks: Track[]; } export declare type EmptyStory = Partial<Story>; export {};