@flosportsinc/ng-video-autoplay
Version:
Simple way to ensure videos autoplay even if they need to be muted first.
25 lines (24 loc) • 1 kB
TypeScript
import { ElementRef, Renderer2, OnDestroy, AfterContentInit, QueryList } from '@angular/core';
export declare class FloVideoAutoplayDirective implements AfterContentInit, OnDestroy {
private elmRef;
private rd;
readonly floVideoAutoplay = true;
readonly floVideoAutoplayClickUnmuteRef?: HTMLElement;
readonly floVideoAutoplayClickPlayRef?: HTMLElement;
readonly floVideoAutoplayIndex = 0;
readonly videos: QueryList<ElementRef<HTMLVideoElement>>;
private readonly onDestroySource;
private readonly onDestroy;
private readonly canExecute;
private readonly maybeVideoElement;
private readonly maybeUnmuteActionRef;
private readonly maybePlayActionRef;
private readonly hideRef;
private readonly showRef;
private readonly volumeChange;
private readonly initOnVideo;
constructor(elmRef: ElementRef<HTMLVideoElement>, rd: Renderer2);
private readonly runUnmuteSequence;
ngAfterContentInit(): void;
ngOnDestroy(): void;
}