Skip to content

Commit

Permalink
feat: add loadeddata event (#266)
Browse files Browse the repository at this point in the history
Co-authored-by: wulewei <wulewei@zhihu.com>
  • Loading branch information
wlw620 and wulewei authored Apr 7, 2022
1 parent 41995c3 commit 797fc6f
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 @@ -9,6 +9,7 @@ enum DOM {
ERROR = 'event/dom/error',
WAITING = 'event/dom/waiting',
CANPLAY = 'event/dom/canplay',
LOADEDDATA = 'event/dom/loadeddata',
}

// custom events
Expand Down Expand Up @@ -100,4 +101,5 @@ export type EventParamsMap = {
}>
[EVENTS.LEAVE_PROGRESS_DOT]: Listen<void>
[EVENTS.SUBSCRIPTION_READY]: Listen<void>
[EVENTS.LOADEDDATA]: 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 @@ -18,6 +18,7 @@ const eventMap: EventPair[] = [
[EVENTS.ERROR, 'onError'],
[EVENTS.WAITING, 'onWaiting'],
[EVENTS.CANPLAY, 'onCanPlay'],
[EVENTS.LOADEDDATA, 'onLoadedData'],
]

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

0 comments on commit 797fc6f

Please sign in to comment.