Skip to content

How to cast a website to smart TV ? #7

Description

@KrLikeblue

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions