Skip to content

How to cast a website to smart TV ? #7

@KrLikeblue

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

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