UNPKG

@aidenlx/player

Version:

Headless web components that make integrating media on the a web a breeze.

61 lines 2.1 kB
import { DisposalBin, ReadableStore } from '@vidstack/foundation'; import { type CSSResultGroup, LitElement, type PropertyValues } from 'lit'; /** * Outputs a media duration (eg: `currentTime`, `duration`, `bufferedAmount`, etc.) value as time * formatted text. * * @tagname vds-time * @example * ```html * <vds-time type="current"></vds-time> * ``` * @example * ```html * <!-- Remaining time. --> * <vds-time type="current" remainder></vds-time> * ``` */ export declare class TimeElement extends LitElement { static get styles(): CSSResultGroup; protected _disposal: DisposalBin; protected _mediaStoreConsumer: import("@vidstack/foundation").ContextConsumerController<import("../../media").WritableMediaStoreRecord>; protected get _mediaStore(): import("../../media").WritableMediaStoreRecord; protected __seconds: number; /** * The type of media time to track. * * @default 'current' */ type: 'current' | 'buffered' | 'duration' | 'seekable'; /** * Whether the time should always show the hours unit, even if the time is less than * 1 hour. * * @default false * @example `20:30` -> `0:20:35` */ showHours: boolean; /** * Whether the hours unit should be padded with zeroes to a length of 2. * * @default false * @example `1:20:03` -> `01:20:03` */ padHours: boolean; /** * Whether to display the remaining time from the current type, until the duration is reached. * * @default false * @example 'duration-currentTime' */ remainder: boolean; connectedCallback(): void; protected update(changedProperties: PropertyValues): void; disconnectedCallback(): void; protected render(): import("lit").TemplateResult<1>; protected _handleTypeChange(): void; protected _getTypeStore(): import("@vidstack/foundation").WritableStore<number>; protected _createRemainderStore(secondsStore: ReadableStore<number>): ReadableStore<number>; protected _getFormattedTime(): string; } //# sourceMappingURL=TimeElement.d.ts.map