-
Notifications
You must be signed in to change notification settings - Fork 270
Open
Description
With the added types in 2.29.4, I would expect to be able to do something like this, instead of using strings like "play"
.
player.on(PlayerEvent.Play, (e) => updateProgress(e));
player.on(PlayerEvent.TimeUpdate, (e) => updateProgress(e));
player.on(PlayerEvent.Ended, (e) => updateProgress(e));
But, unfortunately, while player.d.ts
exports this enum via export * from ./events.ts
, this doesn't work, because the enum cannot be imported as a "thing" in JS for runtime. player.es.js
doesn't export it. I'm not very good at TS, so, I may be missing something, but I thought I'd mention it. For now, I'm still using strings.
Metadata
Metadata
Assignees
Labels
No labels