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

Unable to get player on ioS working while using google cloud storage #183

Closed
raghav85 opened this issue Jun 2, 2019 · 10 comments
Closed
Labels
bug platform-ios Affects the ios platform

Comments

@raghav85
Copy link

raghav85 commented Jun 2, 2019

G'day,

I am currently experiencing issue with getting to play audio files streamed from Google cloud storage bucket to play on real iOS devices - Iphone 8 and Iphone SE both having the latest iOS updates.
Tried with both modes of player - Media Player and Streaming.

Cloud storage URL looks like: https://firebasestorage.googleapis.com/v0/b/mybucket.appspot.com/o/w%3g2Fcc59f-1423-4abe.mp4?alt=media&token=xxx

When I try with public URLs, I don't get the error and it plays well:
https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4

Error received in _audioPlayer.onPlayerError : AVPlayerItemStatus.failed

Version: 0.12.0

Strangely on Android, there are no issues observed irrespective of the URLs used and works great!

Many Thanks.

@raghav85
Copy link
Author

raghav85 commented Jun 3, 2019

After many hours of troubleshooting found that if the gzip option is set to true while objects are being uploaded to Cloud storage, then playing it in iOS using AVplayer throws player error as above. Android doesn't seem to care and plays well irrespective of the option set.
This may be useful for someone in the future.
Thanks!

@raghav85 raghav85 closed this as completed Jun 3, 2019
@erickzanardo
Copy link
Member

Thanks for reporting back, sorry we did not responded in time, we have been very busy lately and not able to respond issue, I will add this to the troubleshoot.md for easy access to this.

@sakinaboriwala
Copy link

@raghav85 @erickzanardo Thanks for finding the issue. How did you workaround this?

@toonztudio
Copy link

I got this problem on cloud storage and shared hosting. So I exported file to .m4a instead of .mp3 and it's fixed on both remote location (shared hosting and cloud firestore).

@sakinaboriwala
Copy link

ohh. So you re-uploaded the audio in a different format?

@toonztudio
Copy link

toonztudio commented Jul 13, 2019 via email

@thejacer87
Copy link

After many hours of troubleshooting found that if the gzip option is set to true while objects are being uploaded to Cloud storage, then playing it in iOS using AVplayer throws player error as above. Android doesn't seem to care and plays well irrespective of the option set.
This may be useful for someone in the future.
Thanks!

you mention a gzip option. can you link to the docs or an example. im trying to find something but coming up empty handed

@raghav85
Copy link
Author

raghav85 commented Jul 17, 2019 via email

@thejacer87
Copy link

so is there no way we can play audio from firebase on ios? is there a different url on the object i can use to fetch the data?

@WaldsonFagundes
Copy link

i'm having trouble using google tts api in ios emulator i'm reading it as BytesSource. On the Android emulator it works OK. Has anyone already achieved something?

@Gustl22 Gustl22 added platform-ios Affects the ios platform bug labels Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform-ios Affects the ios platform
Projects
None yet
Development

No branches or pull requests

7 participants