使用 Chromecast 显示图像
Display image with Chromecast
我正在开发一个图库应用程序,我希望它与 Chromecast 兼容。
我搜索并尝试了好几天,但无法正常工作。我了解到我需要创建一个网络服务器 (NanoHTTPD) 并发送图像的 url。有人可以给我一个简单的教程吗?
如果我有图片的路径,如何以最简单的方式显示出来?
谢谢!
有大量示例和资源可向您展示如何投射视频,因此请熟悉这些内容。然后,要发送图像,您需要执行相同的步骤,但您的 MediaInfo object that represents your item (image in this case) needs to have its URL set to the url of the image, served by your embedded server (for example, if you put that url in your web browser on your laptop on the same network, you should be able to see the image). Then load that media item the same way you would load a video. For the simplest solution, you can use the default receiver;它支持图像。
我正在开发一个图库应用程序,我希望它与 Chromecast 兼容。 我搜索并尝试了好几天,但无法正常工作。我了解到我需要创建一个网络服务器 (NanoHTTPD) 并发送图像的 url。有人可以给我一个简单的教程吗?
如果我有图片的路径,如何以最简单的方式显示出来?
谢谢!
有大量示例和资源可向您展示如何投射视频,因此请熟悉这些内容。然后,要发送图像,您需要执行相同的步骤,但您的 MediaInfo object that represents your item (image in this case) needs to have its URL set to the url of the image, served by your embedded server (for example, if you put that url in your web browser on your laptop on the same network, you should be able to see the image). Then load that media item the same way you would load a video. For the simplest solution, you can use the default receiver;它支持图像。