Skip to content

Commit

Permalink
chore: add player progress event
Browse files Browse the repository at this point in the history
  • Loading branch information
wulewei authored and ambar committed Sep 27, 2022
1 parent 21e333b commit 26964fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/griffith-message/src/constants/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enum DOM {
WAITING = 'event/dom/waiting',
CANPLAY = 'event/dom/canplay',
LOADEDDATA = 'event/dom/loadeddata',
PROGRESS = 'event/dom/progress',
}

// custom events
Expand Down Expand Up @@ -102,4 +103,5 @@ export type EventParamsMap = {
[EVENTS.LEAVE_PROGRESS_DOT]: Listen<void>
[EVENTS.SUBSCRIPTION_READY]: Listen<void>
[EVENTS.LOADEDDATA]: Listen<void>
[EVENTS.PROGRESS]: Listen<void>
}
1 change: 1 addition & 0 deletions packages/griffith/src/components/VideoWithMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const eventMap: EventPair[] = [
[EVENTS.WAITING, 'onWaiting'],
[EVENTS.CANPLAY, 'onCanPlay'],
[EVENTS.LOADEDDATA, 'onLoadedData'],
[EVENTS.PROGRESS, 'onProgress'],
]

function serializeDOMException(exception?: MediaError | null) {
Expand Down

0 comments on commit 26964fd

Please sign in to comment.