Skip to content

Commit

Permalink
feat: enable full screen support
Browse files Browse the repository at this point in the history
  • Loading branch information
kkweon committed Jun 27, 2021
1 parent 72cfe3e commit 3abb19c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c

COCOAPODS: 1.10.0
COCOAPODS: 1.10.1
12 changes: 10 additions & 2 deletions client/lib/widgets/detail/youtube_native.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ class _YouTubeWidgetState extends State<YoutubeWidget> {
void initState() {
super.initState();

_controller = YoutubePlayerController(initialVideoId: widget.youtubeId);
_controller = YoutubePlayerController(
initialVideoId: widget.youtubeId,
);
}

@override
Widget build(BuildContext context) {
return YoutubePlayer(controller: _controller);
// YoutubePlayerBuilder is needed for full screen support.
return YoutubePlayerBuilder(
player: YoutubePlayer(
controller: _controller,
showVideoProgressIndicator: true,
),
builder: (context, player) => Expanded(child: player));
}
}
4 changes: 3 additions & 1 deletion client/lib/widgets/detail/youtube_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class _YouTubeWidgetState extends State<YoutubeWidget> {
void initState() {
super.initState();

_controller = YoutubePlayerController(initialVideoId: widget.youtubeId);
_controller = YoutubePlayerController(
initialVideoId: widget.youtubeId,
params: const YoutubePlayerParams(showFullscreenButton: true));
}

@override
Expand Down

0 comments on commit 3abb19c

Please sign in to comment.