@interactive-video-labs/angular
Version:
Thin Angular wrapper for the @interactive-video-labs/core engine. Enables cue-based interactive video playback in Angular applications.
62 lines (59 loc) • 2.22 kB
text/typescript
import { AfterViewInit, OnDestroy, OnChanges, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
import { CuePoint, Translations, AnalyticsEvent, AnalyticsPayload, IVLabsPlayer } from '@interactive-video-labs/core';
export { AnalyticsEvent, AnalyticsPayload, CuePoint, IVLabsPlayer, PlayerConfig, Translations } from '@interactive-video-labs/core';
/**
* A standalone Angular component that wraps the IVLabsPlayer to provide interactive video capabilities.
* It handles the lifecycle of the player, including initialization, updates, and destruction.
*/
declare class InteractiveVideoComponent implements AfterViewInit, OnDestroy, OnChanges {
/**
* The URL of the video to be loaded.
*/
videoUrl: string;
/**
* An array of cue points for interactive events.
*/
cues?: CuePoint[];
/**
* An object containing translations for the player.
*/
translations?: Translations;
/**
* Whether the video should start playing automatically.
*/
autoplay: boolean;
/**
* Whether the video should loop.
*/
loop: boolean;
/**
* The locale to be used for the player.
*/
locale: string;
/**
* The ID of an external HTML element where the player will be mounted.
* If provided, the component will not render its own container div.
*/
targetElementId?: string;
/**
* Emits analytics events from the player.
* The payload is a tuple containing the event name and the associated data.
*/
analyticsEvent: EventEmitter<[event: AnalyticsEvent, payload?: AnalyticsPayload | undefined]>;
playerContainer?: ElementRef<HTMLDivElement>;
player: IVLabsPlayer | null;
playerTargetId: string;
constructor();
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
private initializePlayer;
}
/**
* @deprecated This module is deprecated. Import `InteractiveVideoComponent` directly as it is a standalone component.
* A module for the InteractiveVideoComponent for non-standalone usage.
*/
declare class InteractiveVideoModule {
constructor();
}
export { InteractiveVideoComponent, InteractiveVideoModule };