-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript: Property 'on' does not exist on type 'Player' #8109
Comments
Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:
|
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
These are the things that I found missing from the v8 types compared to the v7 ones: On the
On
|
The v8 types/typing is very incomplete too. |
In my case, there was a change in typings from separate package
|
Similar problem here, use to have following import in v7 with import videojs, { type VideoJsPlayer, type VideoJsPlayerOptions } from 'video.js' Now with v8, I got errors and fail to build:
|
@boris-petrov Thanks, it helped with missing player type. For the other problem I used workaround: I think the signature for |
We have similar issue on 8.2.0 as well and we have to use Errors -> |
My original issue is resolved with the latest release, so closing. If others are still seeing typing issues, I recommend opening a separate issue with an example. Thanks for the fix! |
Description
The TypeScript definitions are missing the methods added by the EventedMixin on the Player class.
Reduced test case
https://github.com/jdufresne/video-js-test
Steps to reproduce
Files:
test.ts
Compiling this TypeScript results in the following error:
Errors
What version of Video.js are you using?
8.0.3
Video.js plugins used.
none
What browser(s) including version(s) does this occur with?
n/a
What OS(es) and version(s) does this occur with?
n/a
The text was updated successfully, but these errors were encountered: