Sending custom UIViewController by Chromecast

廉价感情. 提交于 2019-12-08 08:45:18

问题


I'm trying to get started with Chromecast as well as Airplay, and I'm a bit stuck : is it possible to send directly a UIViewController to the Chromecast-connected device? From what I looked, it seems I am only able to send basic media (image, text, video) to the device. So, if I understand, the only solution would be to "re-create" the interface by sending the components one by one? (is that even possible? or can you display only one media at once?)

Thanks


回答1:


You can create custom channels using HTML5 and you can stream to in-built receiver apps, but no, you cannot send a UIView directly to a Chromecast device




回答2:


What you want to use is called "Cast Remote Display". It's currently experimental but shows up in the docs here:

https://developers.google.com/cast/docs/remote

...and there is a sample project here:

https://github.com/googlecast/CastRemoteDisplay-iOS

The sample worked for me without any trouble. Note: you will have to register an app on the cast portal and also register your test device. There was a $5 fee. (There are three types, for this you need to select "Remote Display Receiver") Portal link:

https://cast.google.com/publish/#/applications/new



来源:https://stackoverflow.com/questions/22501831/sending-custom-uiviewcontroller-by-chromecast

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!