OpenCastSwift
OpenCastSwift copied to clipboard
How to cast a website to smart TV ?
Hello,
I want to cast website to smart TV. for example I want to load "www.google.com" in my iPhone and cast it to TV. How can I do that ?
What I will have to change in below code ?
client.launch(appId: CastAppIdentifier.defaultMediaPlayer) { (result) in
switch result {
case .success(let app):
let media = CastMedia(title: "TEST CAST", url: URL(string: "http://traffic.libsyn.com/billburr/MMPC_8-1-16.mp3")!, contentType: "audio/mp3")
self.client.load(media: media, with: app) { result in
switch result {
case .success(let status):
print(status)
case .failure(let error):
print(error)
}
}
case .failure(let error):
print(error)
}
}