Play encrypted video in flutter
sajadj313 last edited by
I have a requirement to play encrypted videos in a flutter application. These files will be stored locally in a mobile device and be played when requested by the media player. The file cannot be decrypted beforehand because of performance issues. Is there a way to handle the decryption while playing the video itself (decrypt file in chunks) ? I'm trying to achieve this through dart itself because this will be used in both iOS and Android. What is the best approach to achieve this? Any comments or suggestions would be appreciated.
pavinduLakshan last edited by
Hi @sajadj313 ,
If you have not decided how you are going to encrypt videos, I'd suggest you to use DASH.
DASH allows encrypting your video files and later streaming videos to the player real time. Therefore videos will not completely be decrypted beforehand.
Flutter video_,player supports both Android and iOS. It also supports DASH type media files (files that have .mpd extension). Therefore, in your scenario, I think using video_player package in flutter along with a way to convert your media files to DASH would be a good solution.