Skip to content

Commit

Permalink
Make VideoPlayer play nicely (#449)
Browse files Browse the repository at this point in the history
Might lead to requests to pause other sources on unmute, but let's solve
one problem at a time.

Co-authored-by: @mykdavies <[email protected]>
  • Loading branch information
mykdavies and limbo-app-dev authored Jul 23, 2023
1 parent 1d7cc6d commit defaac1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/widgets/post/post_video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ class _PostVideoState extends State<PostVideo> {
void initState() {
super.initState();

_controller = VideoPlayerController.networkUrl(url, httpHeaders: {
HttpHeaders.userAgentHeader:
Platform.isAndroid ? 'ExoPlayer' : 'Liftoff/1.0'
});
_controller = VideoPlayerController.networkUrl(url,
httpHeaders: {
HttpHeaders.userAgentHeader:
Platform.isAndroid ? 'ExoPlayer' : 'Liftoff/1.0'
},
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true));

_controller.setLooping(true);

Expand Down

0 comments on commit defaac1

Please sign in to comment.