vlitejs / vlite

🦋 vLitejs is a fast and lightweight Javascript library for customizing video and audio player in Javascript with a minimalist theme (HTML5, Youtube, Vimeo, Dailymotion)
https://vlite.js.org
MIT License
266 stars 18 forks source link

Fix the destroy method #125

Closed tadaskarpavicius closed 4 weeks ago

tadaskarpavicius commented 5 months ago

This PR contains a:

Motivation / Use-Case

destroy() method should remove all traces of the plugin and restore the media element to its original state. At the moment it just removes the container element (with video element itself) which is not an expected behavior

Breaking Changes

Potentially breaking in those cases where users expected such destroy() behavior and wrote code which interacts with outerContainer after destroy method was called

Additional Info

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
vlite ✅ Ready (Inspect) Visit Preview Jul 26, 2024 2:36pm
yoriiis commented 5 months ago

Hello @tadaskarpavicius, thanks for your feedback!

Interesting, indeed, the changes are potentially breaking and I don't want to make a major release with just that for the moment.

I can add a parameter (disabled by default) to the "destroy" function that does this behaviour. Tell me what you think

yoriiis commented 1 month ago

@tadaskarpavicius Still relevant today?

yoriiis commented 4 weeks ago

Closing due to inactivity. Thanks! Feel free to reopen if relevant.