Hacker News new | ask | show | jobs
by MeoMix420 4538 days ago
Yeah, there's definitely a few workarounds. Things aren't really designed with Chrome Extensions in mind ever -- down to the fact that their URL isn't http or https. I even have to make myself look like a website by intercepted the headers being sent out by the iframe: https://github.com/MeoMix/StreamusChromeExtension/blob/maste... But, yes, the YouTube IFrame API is called from the background, but it still need a DOM element to target which gets destroyed on the foreground.

In theory, it would be possible to spawn a second, muted instance of the YouTube API in the foreground and, when the user wants video, swap to it while attempting to not introduce noticeable audio issues, but that seemed pretty ugly for now. I think if I ever get around to playing with cross-fading (http://solayo.com/ supports it..) then I might be confident enough to try this out.

I'm glad you like radio mode. It can go off-track sometimes... had people complain about Justin Bieber and other Top 40 leaking into it. I starred your repo -- if you ever want to collab or chat about ideas, I'm down! I'm always idling on IRC: #streamus irc.freenode.net

Yeah, I know about that bug. I haven't quite figured it out yet because all of my canvas elements are the exact same size -- something about YouTube serving up a different quality of image, maybe. I only released video back into the wild about 2 days ago and it might be removed again temporarily while I debug further.

Oh, also, if it wasn't immediately apparent -- there's also a whole server + DB backing this. This is only to allow sharing of playlists for now, but definitely opens the door to more possibilities in the future.

Here's a couple of full-length tracks I'm listening to currently: http://share.streamus.com/playlist/9a9b8a640590/hacker_news_...

:)