Skip to content

Commit 21c5512

Browse files
authored
Fix video playback on istream.ntut.edu.tw (#258)
fix: pass authentication headers to video player for istream playback
1 parent 3333431 commit 21c5512

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ui/pages/videoplayer/class_video_player.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ class _VideoPlayer extends State<ClassVideoPlayer> {
158158
}
159159

160160
Future<void> initController(Uri url) async {
161+
final headers = await Connector.getLoginHeaders(url.toString()) ?? {};
161162
_playerController = VideoPlayerController.networkUrl(
162163
url,
164+
httpHeaders: headers,
163165
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
164166
);
165167

0 commit comments

Comments
 (0)