Skip to content

feat: allow external control #118

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pReya
Copy link
Collaborator

@pReya pReya commented Mar 7, 2025

closes #56

Currently the possibilities to control the iframe from the outside were a little limited (and not well documented). So I fixed this by:

  • Adding enableJsApi prop, which tells the YT iframe to listen for messages
  • Adding alwaysLoadIframe prop, in case someone wants to externally start playing the video (without clicking the poster first)
  • Adding more documentation on controlling the iframe from the outside
  • Refactored the creation of the YT iframe parameter string (using the URLSearchParams() class instead of manual template string fiddling) -> this should be less error prone
  • Ran prettier on everything

@pReya
Copy link
Collaborator Author

pReya commented Mar 7, 2025

@ibrahimcesar Can you give this a review?

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

Successfully merging this pull request may close these issues.

Ability to control the player by JS
1 participant