Skip to content

Commit

Permalink
更新日志
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Aug 17, 2023
1 parent ddceda1 commit b800f1b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
7 changes: 7 additions & 0 deletions change_log/1.0.1.0817.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## 1.0.1

### 修复
+ 升级播放器依赖
+ android平台 AV1格式视频支持
+ 视频全屏功能

12 changes: 6 additions & 6 deletions lib/plugin/pl_player/utils/fullscreen.dart
Original file line number Diff line number Diff line change
@@ -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<void> landScape() async {
// if (Platform.isAndroid || Platform.isIOS) {
// await AutoOrientation.landscapeAutoMode(forceSensor: true);
// }
// }
Future<void> landScape() async {
if (Platform.isAndroid || Platform.isIOS) {
await AutoOrientation.landscapeAutoMode(forceSensor: true);
}
}

//竖屏
Future<void> verticalScreen() async {
Expand Down
6 changes: 3 additions & 3 deletions lib/plugin/pl_player/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
} else {
// 竖屏
await verticalScreen();
Expand All @@ -177,14 +177,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
break;
case FullScreenMode.horizontal:

/// 进入全屏
await enterFullScreen();
// 横屏
// await landScape();
await landScape();
break;
}

Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b800f1b

Please sign in to comment.