Skip to content

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?

@ibrahimcesar
Copy link
Owner

LGTM!

@ibrahimcesar ibrahimcesar merged commit 6e18675 into ibrahimcesar:main Apr 22, 2025
1 check passed
ibrahimcesar added a commit that referenced this pull request Apr 22, 2025
- feat: allow external control (#118)
- fix: demo/package.json & demo/package-lock.json to reduce vulnerabilities (#122)

🎉 @rohan044 added to the project as a co-maintainer
@pReya pReya deleted the feat/allow-external-control branch May 13, 2025 19:49
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

2 participants