@taole/giftstage 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/core/gift-stage.d.ts +8 -0
- package/dist/gift-stage.cjs.js +7 -7
- package/dist/gift-stage.es.js +829 -736
- package/dist/types/index.d.ts +11 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -528,6 +528,12 @@ export interface AddGiftOptions {
|
|
|
528
528
|
/** Whether to auto-remove after playback stops. Default: true. */
|
|
529
529
|
clearsAfterStop?: boolean;
|
|
530
530
|
mute?: boolean;
|
|
531
|
+
/**
|
|
532
|
+
* SVGA only: called when the visible frame advances. Slow frames may be
|
|
533
|
+
* skipped, so consumers should compare with a threshold instead of requiring
|
|
534
|
+
* an exact frame number.
|
|
535
|
+
*/
|
|
536
|
+
onFrame?: (frame: number, gift: GiftHandle) => void;
|
|
531
537
|
onComplete?: (gift: GiftHandle) => void;
|
|
532
538
|
}
|
|
533
539
|
export interface GiftHandle {
|
|
@@ -560,6 +566,10 @@ export interface GiftSlot {
|
|
|
560
566
|
loopCount: number;
|
|
561
567
|
videoEntity: VideoEntity | null;
|
|
562
568
|
loadAbortController?: AbortController | null;
|
|
569
|
+
/** HTMLVideoElement finite-playback watchdog; cleared on normal completion or resource release. */
|
|
570
|
+
videoPlaybackWatchdogTimer?: ReturnType<typeof setTimeout> | null;
|
|
571
|
+
/** Guards the HTMLVideo ended/watchdog race so completion is dispatched exactly once. */
|
|
572
|
+
videoPlaybackCompletionStarted?: boolean;
|
|
563
573
|
svgaSlotTextures?: Map<string, ResolvedSVGASlotTexture>;
|
|
564
574
|
videoElement: HTMLVideoElement | null;
|
|
565
575
|
releaseMediaSource?: (() => void) | null;
|
|
@@ -601,6 +611,7 @@ export interface GiftSlot {
|
|
|
601
611
|
map: unknown;
|
|
602
612
|
size: number;
|
|
603
613
|
};
|
|
614
|
+
onFrame?: (frame: number, gift: GiftHandle) => void;
|
|
604
615
|
onComplete?: (gift: GiftHandle) => void;
|
|
605
616
|
}
|
|
606
617
|
export interface VAPConfig {
|
package/package.json
CHANGED