如何从 Flutter 应用程序在 google chromecast 中播放 YouTube 视频? [英] How to play YouTube videos in google chromecast from Flutter application?

查看:45
本文介绍了如何从 Flutter 应用程序在 google chromecast 中播放 YouTube 视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Flutter 应用程序有一些 YouTube 视频链接.那些 YouTube 链接,我想通过 google chromecast 进行流式传输.我已经看到一些使用以下 flutter 库的视频流转换.

但这些库正在播放 MP4 格式的视频流.所以我正在寻找通过 chromecast 中的 flutter 应用程序播放 YouTube 视频的方法.

如果有任何代码线索,请有人建议我.

解决方案

我们遇到了同样的挑战,我们四处寻找.终于找到了使其工作的解决方案:https://pub.dev/packages/dart_chromecast>

确保您的 flutter 编译器已降级到 13 或以下.否则,您将无法编译.不幸的是,较新版本的 flutter 编译器不支持他们的代码,作者不会很快更新.

My Flutter application has some YouTube video links. Those YouTube links, i would like to stream through google chromecast. I have seen some video stream casting using the below flutter libraries.

But those libraries are playing MP4 format video streaming. So i am searching for the way to play YouTube videos though flutter application in chromecast.

Please someone suggest me if there is any code clues for this.

解决方案

We had the same challenge, and we searched high and low. Finally found this solution to make it work: https://pub.dev/packages/dart_chromecast

Make sure your flutter compiler is downgraded to 13 or below. Otherwise, you will not be able to compile. Unfortunately, their code is not supported in a newer version of the flutter compiler and the author is not going to update anytime soon.

这篇关于如何从 Flutter 应用程序在 google chromecast 中播放 YouTube 视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆