@namiml/web-sdk
Version:
Subscription monetization infrastructure — drop-in SDK with no-code paywalls, onboarding flows, A/B testing for web
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;
}