SRGSSR / pillarbox-web

Pillarbox is a versatile media playback ecosystem engineered for the web.
https://srgssr.github.io/pillarbox-web-demo/
MIT License
11 stars 1 forks source link

`Player` class is not exposed in the main typings entry point #205

Closed jboix closed 6 months ago

jboix commented 6 months ago

The Pillarbox custom player should be accessible through the main entry point of the generated typings. Otherwise, it is not possible to cast the player once initialized, as shown in the following code snippet:

import { default as pillarbox, Player as PillarBoxPlayer } from "@srgssr/pillarbox-web";

const player = pillarbox('my-player') as PillarBoxPlayer; // Can't obtain this type
player.src({ src: 'urn:rts:video:6820736', type: 'srgssr/urn' });

The Player class is currently not exported in the main typings entry point. See the tsconfig.json file below:

https://github.com/SRGSSR/pillarbox-web/blob/8353dd8e7d7943d3a9f3ea5b171ac71c31f59116/tsconfig.json#L10)

Suggestion

github-actions[bot] commented 6 months ago

:tada: This issue has been resolved in version 1.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: