import { BehaviorSubject } from 'rxjs'; import { STAudioQualityEnum } from '../../models/sdk/enums/audio-quality-enum'; import { STContent } from '../../models/sdk/content'; import { STFormData } from '../../models/sdk/form-data'; import { STLocation } from '../../models/sdk/location'; import { STPlaylist } from '../../models/sdk/playlist'; import { STSite } from '../../models/sdk/site'; import { STTrack } from '../../models/sdk/track'; import { STWidgetConfiguration } from '../../models/sdk/widget-configuration'; /** * Interface of feature to expose * via staytuned sdk middleware hook */ export interface STMiddlewareHookInterface { currentTrack$: BehaviorSubject; currentTrackAudioQuality$: BehaviorSubject; currentPlaylist$: BehaviorSubject; audioDuration$: BehaviorSubject; currentTime$: BehaviorSubject; currentState$: BehaviorSubject; gatedLock$: BehaviorSubject; playRequested$: BehaviorSubject; load: (playable?: STPlaylist | STTrack, index?: number) => void; play: (playable?: STPlaylist | STTrack, index?: number, playbackFromHistory?: boolean) => void; playAtIndex: (index: number, playbackFromHistory?: boolean) => void; next: () => void; prev: () => void; stop: () => void; mute: () => void; unmute: () => void; seekTo: (time: number) => void; fastForward: (time?: number) => void; rewind: (time?: number) => void; getContent: (contentKey: string) => Promise; getContentBy: (prop: string, value: any) => Promise; getWidgetConfiguration: (widgetConfigurationKey: string) => Promise; getLocation: () => Promise; getEnvironment: () => string; getFormData: (id: number, formKey: string) => Promise; getCid: () => string; setCid: (cid: string) => void; emitEvent: (eventName: string, event?: any) => void; onEvent: (eventName: string, cb: (event?: any) => any) => void; getSiteOfLocation: (locationKey: string) => Promise; }