OvenPlayer icon indicating copy to clipboard operation
OvenPlayer copied to clipboard

Typescript declarations

Open llspalex opened this issue 3 years ago • 7 comments

Hello 😃

Would it be possible for AirenSoft to share a Typescript declaration file for OvenPlayer and / or publish it to the Definitely Typed repo?

llspalex avatar May 23 '21 21:05 llspalex

@llspalex Hello. Thank you for visiting OvenPlayer. We are currently preparing npm packaging. When we are ready, we will be happy to contribute to DefinitelyTyped.

SangwonOh avatar May 25 '21 13:05 SangwonOh

@SangwonOh Thank you, that would be great. I'd like to use OvenPlayer as a React component in a Typescript project, so the ts declarations will be very helpful.

llspalex avatar May 25 '21 13:05 llspalex

I am currently adding WebRtc + WebRtcLoader + Provider to a Typescript&Angular based project and would like to contribute to an npm package and also contribute to the type definitions. Could you maybe publish your work in progress as a new branch, if community contributions are welcome?

In case anyone here wants to use the WebRTC player asap: I first tried using OvenPlayer, but it is quite heavyweight and not all use cases need the UI + fonts and so on. Also, creating typedefs for everything at once would be a lot of work. The separation of the WebRTC code already exists, so to get a separately usable WebRTC.js, I mostly only had to add a 'WebRTC': './src/js/api/provider/html5/providers/WebRTC.js', line to entry in the webpack.config.js.

basisbit avatar Jul 12 '21 16:07 basisbit

Community contributions are very welcome :). But it doesn't seem possible to create a new branch at this point.

As you mentioned, OvenPlayer is pretty heavy, and modules that aren't fully decoupled make it difficult to lighten the player. As you know, using WebRTC.js as an entry requires additional coding.

Lightening the player and npm distribution (including the full version, the version including only webrtc, etc.) requires a lot of modifications to the underlying code of the player and should be carefully worked for stability.

We are very busy right now, so we can't work on it, but we will definitely work on it next month.

After the above work is done, it would be nice to contribute your experiences with type definitions and angular components.

SangwonOh avatar Jul 13 '21 05:07 SangwonOh

Any updates on this? Thanks!

sezze avatar Jan 23 '22 11:01 sezze

Everything is ready. If there are no problems after testing, I will send a pull request to the Typescript declaration soon. Thanks for reminding me again.

SangwonOh avatar Jan 24 '22 01:01 SangwonOh

Everybody, finally added the OvenPlayer to Typescript declarations.

DefinitelyTyped Ropository

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ovenplayer

NPM package

https://www.npmjs.com/package/@types/ovenplayer

However, the detailed OvenPlayer configuration was set to any type and could not be defined in detail. We look forward to everyone's contributions to this work.

Thank you for waiting so long.

SangwonOh avatar Mar 25 '22 13:03 SangwonOh

We are closing the issue due to a long period of inactivity.

SangwonOh avatar Jan 12 '24 06:01 SangwonOh