Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Safety 2.0 with Chromecast, Airplay Platform specific updates #20

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

tsvillain
Copy link

Below is the list of updates made on this plugin to work with the latest Flutter projects

  • Migrate to Null Safety

Chromecast specific updates:

  • position() returns current position of casted video in Future<Duration?>.
  • duration() returns the full duration of the casted video in Future<Duration?>.
  • setVolume(volume: 0.8) used to set the chromecast volume value can be from 0 to 1 (0.8 = 80% volume).
  • getVolume() returns current volume of the chromecast device in Future<double>.
  • endSession() as the name suggest will end the current session with chromecast device.

Airplay specific updates:

  • isAirplayConnected return true if airplay is connected.

This PR will close: #19 #18 #17

@yelkamel
Copy link

Can you merge this branch ? @PalaTeam pls

@renanmgs
Copy link

How can i use this in my project?

@tsvillain
Copy link
Author

@renanmgs in pubspec.yaml add following:

flutter_video_cast:
    git:
      url: https://github.com/samyakkkk/flutter_video_cast.git
      ref: master

@renanmgs
Copy link

Do you know if it support .m3u8 files? I using it for a streamign app that used .m3u8.

@tsvillain
Copy link
Author

tsvillain commented Feb 15, 2022 via email

@renanmgs
Copy link

renanmgs commented Feb 22, 2022

Hi @tsvillain, i found a problem with the package:

It is stated that we need to use FlutterFragmentActivity with CastContext.getSharedInstance(applicationContext), but if i use this my app lose the hability to DeepLink (use external links as directions to routes).

Deeplinking works if i use FlutterActivity instead of FlutterFragmentActivity, but the ChromeCast Button crashes the app when pressed.

How it works with DeepLinking but crashes on press:
image

How it breaks DeepLinking:
image

I need to use the AudioService package due to some other things that i do in the app, but i found no problem keeping it in the same method in the second image (i cropped it from the image)

@tsvillain
Copy link
Author

Hi @tsvillain, i found a problem with the package:

It is stated that we need to use FlutterFragmentActivity with CastContext.getSharedInstance(applicationContext), but if i use this my app lose the hability to DeepLink (use external links as directions to routes).

Deeplinking works if i use FlutterActivity instead of FlutterFragmentActivity, but the ChromeCast Button crashes the app when pressed.

How it works with DeepLinking but crashes on press: image

How it breaks DeepLinking: image

I need to use the AudioService package due to some other things that i do in the app, but i found no problem keeping it in the same method in the second image (i cropped it from the image)

This should be on StackOverflow.
Flutter folks can help you there.

@kkoken
Copy link

kkoken commented Feb 25, 2022

@tsvillain onSessionEnded callback method called I tried to get the video's last position; however, it always returns the position I start to cast. Do you guys have any idea to solve this issue? (For example, video duration is 60 seconds, I started to cast at 10th seconds, I seek to 30th seconds. Then, I ended the session. When on onSessionEnded callback method, I call position method, and it returns 10th seconds.)

@jpolstre
Copy link

jpolstre commented Apr 3, 2022

Sí, es compatible con ese formato.

El martes 15 de febrero de 2022 a las 21:51 renanmgs, @.> escribió: ¿Sabe si admite archivos .m3u8? Lo uso para una aplicación streamign que usaba .m3u8. — Responda a este correo electrónico directamente, véalo en GitHub < #20 (comentario) >, o cancele la suscripción < https://github.com/notifications/unsubscribe-auth/AKBQCZ347ZJK67N4DH6P3XTU3J4RXANCNFSM5KZ7YB3A >. Estás recibiendo esto porque eres el autor del hilo. ID del mensaje: @.>

My m3u8 video files use headers in order to play. How can I send the headers along with the url of the m3u8.

@dmiedev
Copy link

dmiedev commented Oct 2, 2022

@AlessioValentiniAesys can you please review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please please pleasu update it to Null safety!
8 participants