From b800f1b83bec8a3cf96406ca28628bebc10bc281 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 17 Aug 2023 10:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- change_log/1.0.1.0817.md | 7 +++++++ lib/plugin/pl_player/utils/fullscreen.dart | 12 ++++++------ lib/plugin/pl_player/view.dart | 6 +++--- pubspec.lock | 8 ++++++++ pubspec.yaml | 2 +- 5 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 change_log/1.0.1.0817.md diff --git a/change_log/1.0.1.0817.md b/change_log/1.0.1.0817.md new file mode 100644 index 00000000..ebc1e155 --- /dev/null +++ b/change_log/1.0.1.0817.md @@ -0,0 +1,7 @@ +## 1.0.1 + +### 修复 ++ 升级播放器依赖 ++ android平台 AV1格式视频支持 ++ 视频全屏功能 + diff --git a/lib/plugin/pl_player/utils/fullscreen.dart b/lib/plugin/pl_player/utils/fullscreen.dart index 6139416d..4f5ca948 100644 --- a/lib/plugin/pl_player/utils/fullscreen.dart +++ b/lib/plugin/pl_player/utils/fullscreen.dart @@ -1,16 +1,16 @@ import 'dart:io'; import 'package:device_info_plus/device_info_plus.dart'; -// import 'package:auto_orientation/auto_orientation.dart'; +import 'package:auto_orientation/auto_orientation.dart'; import 'package:flutter/services.dart'; //横屏 /// 低版本xcode不支持auto_orientation -// Future landScape() async { -// if (Platform.isAndroid || Platform.isIOS) { -// await AutoOrientation.landscapeAutoMode(forceSensor: true); -// } -// } +Future landScape() async { + if (Platform.isAndroid || Platform.isIOS) { + await AutoOrientation.landscapeAutoMode(forceSensor: true); + } +} //竖屏 Future verticalScreen() async { diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index bacb2c71..037ef6de 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -166,7 +166,7 @@ class _PLVideoPlayerState extends State /// 进入全屏 await enterFullScreen(); // 横屏 - // await landScape(); + await landScape(); } else { // 竖屏 await verticalScreen(); @@ -177,14 +177,14 @@ class _PLVideoPlayerState extends State /// 进入全屏 await enterFullScreen(); // 横屏 - // await landScape(); + await landScape(); break; case FullScreenMode.horizontal: /// 进入全屏 await enterFullScreen(); // 横屏 - // await landScape(); + await landScape(); break; } diff --git a/pubspec.lock b/pubspec.lock index a2474eb2..eed68120 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -57,6 +57,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" + auto_orientation: + dependency: "direct main" + description: + name: auto_orientation + sha256: cd56bb59b36fa54cc28ee254bc600524f022a4862f31d5ab20abd7bb1c54e678 + url: "https://pub.dev" + source: hosted + version: "2.3.1" boolean_selector: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f2bedd8c..ea33e23a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -108,7 +108,7 @@ dependencies: # 进度条 audio_video_progress_bar: ^1.0.1 animations: ^2.0.7 - # auto_orientation: ^2.3.1 + auto_orientation: ^2.3.1 # 获取appx信息 package_info_plus: ^4.1.0