Skip to content

Would like a Cast / ChromeCast plugin for Flutter #18212

Closed

Description

@eseidelGoogle

The Cast team received a request for Flutter support in https://issuetracker.google.com/80453460. It's not clear that adding such would require any work to the Android or iOS Cast SDKs, so I've filed this.

I suspect the desired solution here would be for someone to write a Cast plugin for Flutter, wrapping the iOS and/or Android Cast SDKs:
https://developers.google.com/cast/docs/developers

Flutter's plugin docs are here:
https://flutter.io/developing-packages/

And many examples here:
https://github.com/flutter/plugins

My understanding of the Cast SDK, is that different actions get casted differently. For example Videos use a separate path than sending screen-by-screen frames, etc. I'm not familiar enough with the details of the Cast SDK to know how much depth there is to such a plugin, or if to have "full support" will require any changes to the Flutter Engine or Framework itself.

Activity

  1. bostrot commented on Jul 24, 2018

    @bostrot

    Any update on this?

  2. eseidelGoogle commented on Jul 24, 2018

    @eseidelGoogle
    ContributorAuthor

    No significant update. I've spoken with at least one member of the Cast SDK team. I've also now spoken with two teams inside Google who have at least mild interest in a Cast SDK plugin for Flutter existing, but I'm not aware of any engineers actively working on such.

  3. Brahmasmi commented on Jul 30, 2018

    @Brahmasmi

    Based on my limited understanding of Google Cast, I do not know if there are changes required to the Flutter engine or the framework.

    However, Cast has historically been a fairly fast moving target. It is current on v3 of the SDK. So I think the Cast plugin would be more maintainable in the long term if the Cast team themselves took ownership of it. If I could draw an analogy, it is similar to how Dart's gRPC implementation is better at home in the Protobuf org rather than the Dart org. The domain specs (Protobuf, gRPC) are more important than the language/framework specs.

    Just my 2 <fiat_currency_unit/100>.

  4. dlevesque1980 commented on Oct 31, 2018

    @dlevesque1980

    Hi,
    This is a plugin I am doing about this. This is not complete, but at a working state. For now It is android only and I am not sure I will do the iOS part. I am a dotnet developer with no experience in Android and iOS. Doing this in Kotlin is already a huge learning curve. The code is MIT license feel free to fork.
    https://github.com/dlevesque1980/cast

  5. ngocdaothanh commented on Nov 12, 2018

    @ngocdaothanh

    Hi, is there any update about this feature?

    I've just bought a Chromecast (latest generation), and I'm really excited to write a Flutter app to cast. My main use is casting audio from iOS.

  6. snaeji commented on Nov 28, 2018

    @snaeji

    This would be a great feature!

  7. stateanomaly commented on Dec 10, 2018

    @stateanomaly

    I agree. My client is definitely looking for this ability. Considering React Native because it already has a package for this.

  8. snaeji commented on Dec 18, 2018

    @snaeji

    I would really like to see this as a goal... It's the most requested feature we have for our app.

  9. added this to the milestone on Dec 18, 2018
  10. 1 remaining item

  11. ott-web commented on Feb 21, 2019

    @ott-web

    Is this request really 9 months old? We should be able to do this pretty easily as a community.

  12. dlevesque1980 commented on Feb 22, 2019

    @dlevesque1980

    There is android plugin I made there. https://github.com/dlevesque1980/cast
    For the IOS part I don't the apple license to do it. But If someone is interesting in doing it. My pleasure to help.

  13. wilsharo commented on Mar 12, 2019

    @wilsharo

    Hi. I see a lot of people have been wanting this feature. So just want to inform you that a developer implemented casting purely in dart and has an example to use it below.

    https://github.com/terrabythia/flutter_chromecast_example

    However that example is a little outdated and doesn't work as is. Well I'm glad to inform you that I was able to make some updates to the example project and their dart_chromecast package in order to get this working. I also added controls to play, stop, pause, and fastforward/rewind videos. And best of all it works for both Android and iOS!

    Credit should go to terrabythia. But I hope my example helps.

    https://github.com/wilsharo/flutter_chromecast_example

    @eseidelGoogle @gedw99 @ott-web @PhilParisot @dlevesque1980

  14. showang commented on May 28, 2019

    @showang

    I made a plugin for display cast button and control connecting behavior.
    But does not include cast media behavior, because it's implementation depends on your player.

    https://pub.dev/packages/flutter_google_cast_button

    I hope it will helps. : )

  15. Hixie commented on Nov 27, 2019

    @Hixie
    Contributor

    Since there are packages and examples for this, I'm going to close it. It's highly unlikely the Flutter team itself would implement this as it is outside of our area of expertise.

  16. amitnair32 commented on Dec 30, 2019

    @amitnair32

    How i can loop a video that's being cast ?

  17. github-actions commented on Aug 15, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Aug 15, 2021
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

    c: new featureNothing broken; request for a new capabilitypackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions