WARNING: A work in progress, this is a first attempt at getting VideoJs working in a Typescript and React Enviroment.
This was inspired from the VideoJS React Tutorial - (see also Brightcover Player with React and Typescript)
Prerequistes Using TypeScript-React-Starter: https://github.com/Microsoft/TypeScript-React-Starter
Then npm install packages
npm i --save video.js
npm i --save-dev @types/video.js
Have any suggestions/improvements? Give me a shout in the comments :)
Thanks for your contribution! - This looks really useful, as I want to use video.js in my typescript/react project.
Following the instructions, I did the npm installs:
I pasted your code verbatim into a file VideojsPlayer.tsx in my project, but Visual Studio Code croaks at line 24:
this.player = videojs(this.videoNode, this.props).ready(function() {
with error message:
Sorry if I'm being stupid - do you have any suggestions what I've done wrong or how to fix it?