OpenCastSwift icon indicating copy to clipboard operation
OpenCastSwift copied to clipboard

How to cast a website to smart TV ?

Open KrLikeblue opened this issue 5 years ago • 0 comments

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)
           }
       }

KrLikeblue avatar Aug 24 '20 05:08 KrLikeblue