Open suterma opened 8 months ago
The playerVars.start
field is typed via TS as number
. This is sadly a short-coming in TS/JS. It doesn't allow specifying which kind of number, like int
or float
.
I will move this issue to the https://github.com/vue-youtube/docs repo add will add more documentation for this.
I added a temporary note to the docs, see https://github.com/vue-youtube/docs/pull/8. Any feedback can be provided in the PR.
I merged the PR. I will keep this issue open to track the progress for the TS/JSDoc integration.
This is maybe more a documentation issue, because the limitation might be stemming from the underlying IFrame player.
When using the
usePlayer
constructor with the composition API, as documented here: https://vue-youtube.github.io/docs/usage/composable#configuration, the start value MUST be an integer (whole) number.If fractions are used (e.g. value 500.1), the value is not applied and the video starts from the beginning.
The solution for this issue might be to document this limitation in the appropriate place, maybe with some simplified example code.
A working example: