Skip to content
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

vite plugin integration + how to set currentTime #1

Open
copeau opened this issue May 16, 2022 · 2 comments
Open

vite plugin integration + how to set currentTime #1

copeau opened this issue May 16, 2022 · 2 comments

Comments

@copeau
Copy link

copeau commented May 16, 2022

Hello,
I've encountered an issue using svelte-react-player with vitejs.
cf. vitejs/vite#8173
vitejs recommended :

  • to have a svelte key that points to the entrypoint
  • to export as ESM

Other thing, how can we set currentTime in the player ?

@schnubor
Copy link
Member

Hi,

thanks for pointing that out!

  1. I added the svelte and "type": "module" keys for ESM so feel free to try again.

  2. As for seeking to a specific timestamp: I haven't figured out a way to do that yet (you need a ref to the player somehow). If you have any idea, feel free to create a PR :) Until then if you're using YouTube you might adjust the videoUrl like e.g. url='https://youtu.be/qv6UVOQ0F44?t=33'

@copeau
Copy link
Author

copeau commented May 19, 2022

Hi !
Thank you for your fix. I will try when i can.
For the timestamp i want to have control on seek and be able to set currentTime, if you have an unbundled version of reactPlayer.js i could try to do some investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants