From a3fceacd46f953bb921abae527015719ce28a2c4 Mon Sep 17 00:00:00 2001 From: Rahim Alwer Date: Fri, 15 Dec 2023 15:03:27 +1100 Subject: [PATCH] fix(player): vimeo playing and progress events not fired closes #1054 --- packages/vidstack/src/providers/vimeo/embed/event.ts | 8 +++++--- packages/vidstack/src/providers/vimeo/provider.ts | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/vidstack/src/providers/vimeo/embed/event.ts b/packages/vidstack/src/providers/vimeo/embed/event.ts index 8c3cb00b2..ff025173a 100644 --- a/packages/vidstack/src/providers/vimeo/embed/event.ts +++ b/packages/vidstack/src/providers/vimeo/embed/event.ts @@ -15,6 +15,8 @@ export const trackedVimeoEvents: VimeoEvent[] = [ // 'loadeddata', // 'loadedmetadata', // 'loadstart', + 'playProgress', + 'loadProgress', 'pause', 'play', 'playbackratechange', @@ -62,7 +64,7 @@ export type VimeoEvent = | 'pause' | 'play' | 'playbackratechange' - | 'playprogress' + | 'playProgress' | 'progress' | 'qualitychange' | 'ready' @@ -96,8 +98,8 @@ export interface VimeoEventPayload { play: VimeoPlayPayload; pause: void; ready: void; - playprogress: VimeoProgressPayload; - loadprogress: VimeoProgressPayload; + playProgress: VimeoProgressPayload; + loadProgress: VimeoProgressPayload; bufferstart: void; bufferend: void; loaded: { id: number }; diff --git a/packages/vidstack/src/providers/vimeo/provider.ts b/packages/vidstack/src/providers/vimeo/provider.ts index d3dfe5cb1..7faf5feaf 100644 --- a/packages/vidstack/src/providers/vimeo/provider.ts +++ b/packages/vidstack/src/providers/vimeo/provider.ts @@ -587,13 +587,13 @@ export class VimeoProvider case 'play': this._onPlay(trigger); break; - case 'playprogress': + case 'playProgress': this._onPlayProgress(trigger); break; case 'pause': this._onPause(trigger); break; - case 'loadprogress': + case 'loadProgress': this._onLoadProgress(payload.seconds, trigger); break; case 'waiting':