@namiml/web-sdk
Version:
Nami Web SDK makes subscriptions & in-app purchases easy, with powerful built-in paywalls and A/B testing
23 lines (22 loc) • 1.12 kB
TypeScript
import { NamiPaywallAction } from "../types/externals/paywall";
import type { PaywallContextProvider } from "../components/ContextProvider";
export declare class VideoService {
video: HTMLVideoElement;
playing: boolean;
muted: boolean;
muteByDefault: boolean;
loopVideo: boolean;
autoplayVideo: boolean;
videoComponentName: string;
videoComponentId: string;
videoSrc: string;
toggling: boolean;
static instance: VideoService | null;
constructor(contextProvider: PaywallContextProvider, video: HTMLVideoElement, name?: string, id?: string);
handleVideoEvents: (contextProvider: PaywallContextProvider) => void;
removeVideoEvents: () => void;
togglePlayVideo(contextProvider: PaywallContextProvider): void;
toggleMuteVideo(contextProvider: PaywallContextProvider): void;
videoPlayingAction(): NamiPaywallAction.VIDEO_STARTED | NamiPaywallAction.VIDEO_PAUSED | NamiPaywallAction.VIDEO_RESUMED | NamiPaywallAction.VIDEO_ENDED | NamiPaywallAction.UNKNOWN;
handlePlayerAnalytics(contextProvider: PaywallContextProvider, action?: NamiPaywallAction): void;
}