Skip to content
Back

Correct way to play videos on storage in #flutter app

  • 0
  • Flutter
  • Auth
  • Storage
  • REST API
Sanket Deshmukh
4 Aug, 2025, 19:25

I’m kinda stuck on what is the correct and seamless way of playing videos stored Appwrite storage in a flutter app. I have long videos of 3-5 hours but of less size - 500-800MB. I am currently trying to generate an authenticated url by creating JWT token and giving it to the video player controller. But my main issue arises when the JWT expires after 15 mins. I am not able to find proper solution for this peculiar issue. I earlier tried to use the getFileView api but it returns bytes with which I’m not sure how to integrate seek and other video player functionality. I keep getting 401 mid stream due to this. I’m using chewie for video playback.

Please suggest the correct way or link to references.

TL;DR
Developers are struggling to play videos stored in Appwrite storage in a Flutter app due to JWT expiration causing 401 errors mid-stream with Chewie video player. The getFileView API returns bytes, making it challenging to integrate seek functionality. A possible solution could be to look into refreshing JWT tokens before they expire or find an alternative approach to handle token expiration seamlessly.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more