2

I'm trying to implement streaming video in my Flutter app using HLS. I'm currently using AWS MediaConvert to transcode my video from mp4 into HLS. I want to restrict the ability to view a video to particular users so I'm using CloudFront Signed URLs. However, when I pass the presigned URL into Flutter's video_player it does not work.

final videoURL = await repo.getVideoURL(video);
videoController = VideoPlayerController.network(videoURL);

The presigned URL is in the form

https://xyz.cloudfront.net/video.m3u8?Policy=xyz&Key-Pair-Id=xyz

Is there another recommended way of setting up streaming video in a Flutter application?

eric6685
  • 85
  • 1
  • 9

1 Answers1

0

There's an open issue in video_player with signed url playback. There's no known workaround at present, but as an alternative, you can download the video to the device and play it locally using video_player in the meantime.

Omatt
  • 8,564
  • 2
  • 42
  • 144