SWFObject, YouTubeAPI Chromeless Player and "Error calling method on NPObject!"

I am using SWFObject to embed and control YouTube videos using the YouTube API. I'm putting the videos in a lightboxed player and need to explicitly tell the movie to stop when the lightbox is closed. Mostly...this works great. But I had to crawl around into the nooks and crannies of what works and doesn't work (i.e., try this...fail, try this...fail, etc.) before settling on a less than ideal solution.

I wrote a wrapper class to simplify the addition of movies in a lightbox (something I've been asked to do many times). Imagein a page with links to many different youtube videos: you click a link and the video pops up into a light box and plays. When you click the close the lightbox button, it pauses the video and then closes the video. The wrapper class was meant to create a player once for the first playback, and then recycle it only replacing the stream.

Well - I discovered that the chromed player doesn't do that. Not supported. Ok - so I use the chromeless player. I discovered that the chromeless player is a different beast. First, it doesn't trigger the onYouTubePlayerReady function which the YouTube API insists on having. Second, despite seeing multiple pages showing how to use SWFObject with a chromeless player, atempts to use it (Firefox on Mac) resulted in a "Error calling method on NPObject!" message, which apparently is due to some security/access issue deep in the bowels of SWFObject.

A full and current (as of this writing) discussion of this error exists here. It looks like a commonly seen problem which is likely in SWFObject, yet SWFObject has yet to be fixed.

My solution was to use the chromed player, and with each new video clicked I just destroyed the movie player and created a new one.