Embedding/Hosting

Is there a way to embed my stream to a page that also changes when I host someone else’s stream?
Like, If I embed my stream on my website and then host a friends stream, is there a way for my streams embed to show the hosted stream?

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.

Use /streams endpoint with ?channel GET parameter in the preferred order and embed the first channel in the returned list, if the list isn’t empty (none of the channels live).