Skip to content

Commit 3a21073

Browse files
sarbagyasthaRaphiTobiabalmagdlongtn-imt
authored
Version Bump (#996)
* fix navigation pop error by canceling PopScope action if pop is alredy confirmed * - Refactor PopScope to pop if the player is not in fullscreen instead of always false. - Remove `Navigator.pop` inside `onPopInvokedWithResult` to avoid issues with external navigation (Example: Pressing dialog barrier, or using an external navigation solution) * 🎨 formaating fixes * fix: Full Screen in Landscape mode cut the video #621 (#962) * Full Screen in Landscape mode cut the video #621 * Full Screen in Landscape mode cut the video #621 * 🎨 minor changes * 🔖 bumped version * minor change --------- Co-authored-by: RaphiTobi <[email protected]> Co-authored-by: abulmajd <[email protected]> Co-authored-by: Nhật Long <[email protected]>
1 parent a5e03fc commit 3a21073

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

packages/youtube_player_flutter/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 9.0.4
2+
* Fixes related to fullscreen toggle.
3+
14
## 9.0.3
25
* Fixes issue where loading indicator would always show.
36
* Updates the default color of the progress indicator to be primary container color.

packages/youtube_player_flutter/lib/src/widgets/youtube_player_builder.dart

+4-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ class _YoutubePlayerBuilderState extends State<YoutubePlayerBuilder>
6767

6868
@override
6969
Widget build(BuildContext context) {
70-
final double height = MediaQuery.of(context).size.height;
70+
final orientation = MediaQuery.orientationOf(context);
71+
final height = MediaQuery.sizeOf(context).height;
7172

72-
final player = Container(
73+
final player = SizedBox(
7374
key: playerKey,
74-
height: (MediaQuery.of(context).orientation == Orientation.landscape) ? height : null,
75+
height: orientation == Orientation.landscape ? height : null,
7576
child: PopScope(
7677
canPop: !widget.player.controller.value.isFullScreen,
7778
onPopInvokedWithResult: (didPop, _) {

packages/youtube_player_flutter/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: youtube_player_flutter
22
description: Flutter plugin for playing or streaming inline YouTube videos using the official iFrame player API. This plugin supports both Android and iOS.
3-
version: 9.0.3
3+
version: 9.0.4
44
repository: https://github.com/sarbagyastha/youtube_player_flutter
55
homepage: https://github.com/sarbagyastha/youtube_player_flutter/tree/master/packages/youtube_player_flutter
66

@@ -16,7 +16,7 @@ dependencies:
1616
dev_dependencies:
1717
flutter_test:
1818
sdk: flutter
19-
mocktail: ^1.0.3
19+
mocktail: ^1.0.4
2020

2121
flutter:
2222
uses-material-design: true

0 commit comments

Comments
 (0)