I come to you with a humble request for guidance. As a newcomer to Angular and someone who has never ventured into the realm of the YouTube JavaScript API, I am well aware that I may be making errors without even realizing it. While my code appears to be functional, I am hoping that the seasoned Angular and JavaScript programmers in this community can review it and provide me with feedback. Constructive criticism is more than welcome, so please don't hesitate to reach out to me directly if you prefer.
Before you dismiss my question and downvote it, rest assured that I am facing a legitimate issue that requires resolution! :)
Within this plunker, you will find a snippet of my website. My goal is to implement a tabbed YouTube player that showcases pre-selected videos, particularly those showcasing dog protection. As I encounter two main challenges, I seek guidance on one of them:
By adding a collapse button to the entire div, I aim to prevent the YouTube players from loading upon initial page load. Instead, I want them to load only when the div is expanded to enhance the page's loading speed. Unfortunately, I am struggling with this implementation (i.e., triggering actions when the collapse state is false). While the plunker may not accurately showcase the collapse feature upon clicking the button, it seems to function correctly in my environment. Nevertheless, I am open to any suggestions or insights based on the provided code.
Any advice you can offer would be greatly valued, and I am willing to provide additional information as needed. Feel free to suggest alternative coding practices, assuming that I have limited knowledge in this area, which is indeed the case :)
Thank you in advance!