import { type SwiperType } from "@app/types"; import { LookupAttr } from "../extensions"; import { ISdk } from "../../"; type SwiperVideoElementType = Window | HTMLElement; type VideoSource = "video" | "youtube" | "tiktok"; type SwiperVideoElementData = { element: SwiperVideoElementType; source: VideoSource; }; /** * Play the video/audio attached to the slide on load where the element is a media element (video/youtube/tiktok) */ export declare function playMediaOnLoad(sdk: ISdk): Promise; /** * Play/Pause the video/audio attached to the slide on navigation where the element is a media element (video/youtube/tiktok) * @param sdk * @param { Swiper } swiper - the swiper element */ export declare function controlVideoPlayback(sdk: ISdk, swiper: SwiperType): Promise; /** * Trigger media play for different media element sources ("video", "youtube", "tiktok") * * @param sdk * @param elementData - the media container element and the source * @param elementData.element - the container element of the media (video tag or iframe.contentWindow) * @param elementData.source - the media source (video for custom video source, youtube/tiktok) */ export declare function triggerPlay(sdk: ISdk, elementData?: SwiperVideoElementData): void; /** * Trigger media pause for different element sources ("video", "youtube", "tiktok") * * @param elementData - the media container element and the source * @param elementData.element - the container element of the media (video tag or iframe.contentWindow) * @param elementData.source - the media source (video for custom video source, youtube/tiktok) * @param reset - reset video position to 0 (default: true) */ export declare function triggerPause(elementData?: SwiperVideoElementData, reset?: boolean): void; /** * Get swiper video/audio element at the provided index. * * @param sdk * @param { Swiper } swiper - the swiper element * @param { number } index - index of the slide to be returned * @returns the video/iframe element or undefined if the element at index is not a video/audio */ export declare function getSwiperVideoElement(sdk: ISdk, swiper: SwiperType, index: number): SwiperVideoElementData | undefined; /** * Setup onload and onerror (yt-video-error) events for youtube media * * @param sdk * @param { Element } tile - the tile element * @param { HTMLElement } widgetSelector - the container of swiper element */ export declare function setupYoutubeEvents(sdk: ISdk, tile: Element, widgetSelector: HTMLElement): void; /** * Setup tiktok player events using window.postMessage api * All media are paused by default and only the media in the active slide is played */ export declare function setupTikTokPlayerReadyEvent(sdk: ISdk): void; /** * Play media associated with currently active tile * * @param sdk * @param { Element } tile - tile element to check * @param { HTMLElement } widgetSelector - the container of the swiper element * @param { LookupAttr } lookupAttr - additional attribute lookup options for finding the first slide to load * @param { LookupAttr.name } lookupAttr.name - name of the attribute for e.g. data-yt-id or data-tiktok-id * @param { LookupAttr.value } lookupAttr.value - required value of the attribute */ export declare function playActiveMediaTileOnLoad(sdk: ISdk, tile: Element, widgetSelector: HTMLElement, lookupAttr?: LookupAttr): void; /** * Setup onload and onerror events for custom video source * * @param sdk * @param { Element } tile - the tile element * @param { HTMLElement } widgetSelector - the container of swiper element */ export declare function setupVideoEvents(sdk: ISdk, tile: Element, widgetSelector: HTMLElement): void; export {}; //# sourceMappingURL=expanded-tile-video.d.ts.map