Embedding/Hosting

I was looking at something like this:
https://github.com/justintv/Twitch-API/blob/master/player.md

And was wondering if there were a way to make a player that checked if a channel was online, if so it would load it and if not it would check the next channel from a list until it found one online.