Why don't you just use swiftcast? It does pretty much what you are asking for.