got it working, but may revert to use on repo (#1888)

This commit is contained in:
Kelsey Jackson
2025-12-19 10:54:45 -06:00
committed by GitHub
parent 7e5f18ea97
commit 56b1196265
2 changed files with 27 additions and 0 deletions

View File

@@ -28,3 +28,4 @@ export type { WaSlideChangeEvent } from './slide-change.js';
export type { WaStartEvent } from './start.js';
export type { WaTabHideEvent } from './tab-hide.js';
export type { WaTabShowEvent } from './tab-show.js';
export type { WaVideoChangeEvent } from './video-change.js';

View File

@@ -0,0 +1,26 @@
export class WaVideoChangeEvent extends Event {
readonly detail: WaVideoChangeEventDetail;
constructor(detail: WaVideoChangeEventDetail) {
super('wa-video-change', { bubbles: true, cancelable: false, composed: true });
this.detail = detail;
}
}
export interface WaVideoChangeEventDetail {
previousIndex: number;
currentIndex: number;
video: {
title?: string;
poster?: string;
duration?: string;
sources: { src: string; type: string }[];
tracks: { src: string; kind: string; srclang: string; label: string }[];
};
}
declare global {
interface GlobalEventHandlersEventMap {
'wa-video-change': WaVideoChangeEvent;
}
}