Merge branch 'main' into design
This commit is contained in:
@ -45,7 +45,7 @@
|
|||||||
android:fullBackupContent="false"
|
android:fullBackupContent="false"
|
||||||
tools:replace="android:allowBackup">
|
tools:replace="android:allowBackup">
|
||||||
<activity
|
<activity
|
||||||
android:name="com.ryanheise.audioservice.AudioServiceActivity"
|
android:name="com.guozhigq.pilipala.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:theme="@style/LaunchTheme"
|
android:theme="@style/LaunchTheme"
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.guozhigq.pilipala
|
package com.guozhigq.pilipala
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
// import io.flutter.embedding.android.FlutterActivity
|
||||||
|
import com.ryanheise.audioservice.AudioServiceActivity;
|
||||||
|
|
||||||
|
class MainActivity: AudioServiceActivity() {
|
||||||
|
|
||||||
class MainActivity: FlutterActivity() {
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:device_info_plus/device_info_plus.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
import 'package:flutter_displaymode/flutter_displaymode.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
@ -67,9 +68,8 @@ void main() async {
|
|||||||
|
|
||||||
// 小白条、导航栏沉浸
|
// 小白条、导航栏沉浸
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
List<String> versionParts = Platform.version.split('.');
|
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||||
int androidVersion = int.parse(versionParts[0]);
|
if (androidInfo.version.sdkInt >= 29) {
|
||||||
if (androidVersion >= 29) {
|
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||||
}
|
}
|
||||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||||
|
|||||||
@ -978,41 +978,8 @@ class PlPlayerController {
|
|||||||
} else {
|
} else {
|
||||||
await landScape();
|
await landScape();
|
||||||
}
|
}
|
||||||
|
} else if (isFullScreen.value && !status) {
|
||||||
// bool isValid =
|
|
||||||
// direction.value == 'vertical' || mode == FullScreenMode.vertical
|
|
||||||
// ? true
|
|
||||||
// : false;
|
|
||||||
// var result = await showDialog(
|
|
||||||
// context: Get.context!,
|
|
||||||
// useSafeArea: false,
|
|
||||||
// builder: (context) => Dialog.fullscreen(
|
|
||||||
// backgroundColor: Colors.black,
|
|
||||||
// child: SafeArea(
|
|
||||||
// // 忽略手机安全区域
|
|
||||||
// top: isValid,
|
|
||||||
// left: false,
|
|
||||||
// right: false,
|
|
||||||
// bottom: isValid,
|
|
||||||
// child: PLVideoPlayer(
|
|
||||||
// controller: this,
|
|
||||||
// headerControl: headerControl,
|
|
||||||
// bottomControl: bottomControl,
|
|
||||||
// danmuWidget: danmuWidget,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// if (result == null) {
|
|
||||||
// // 退出全屏
|
|
||||||
// StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
|
||||||
// exitFullScreen();
|
|
||||||
// await verticalScreen();
|
|
||||||
// toggleFullScreen(false);
|
|
||||||
// }
|
|
||||||
} else if (isFullScreen.value) {
|
|
||||||
StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
StatusBarControl.setHidden(false, animation: StatusBarAnimation.FADE);
|
||||||
// Get.back();
|
|
||||||
exitFullScreen();
|
exitFullScreen();
|
||||||
await verticalScreen();
|
await verticalScreen();
|
||||||
toggleFullScreen(false);
|
toggleFullScreen(false);
|
||||||
|
|||||||
14
pubspec.lock
14
pubspec.lock
@ -69,10 +69,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: audio_service
|
name: audio_service
|
||||||
sha256: a4d989f1225ea9621898d60f23236dcbfc04876fa316086c23c5c4af075dbac4
|
sha256: "4547c312a94f9cb2c48b60823fb190767cbd63454a83c73049384d5d3cba4650"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.18.12"
|
version: "0.18.13"
|
||||||
audio_service_platform_interface:
|
audio_service_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -85,10 +85,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: audio_service_web
|
name: audio_service_web
|
||||||
sha256: "523e64ddc914c714d53eec2da85bba1074f08cf26c786d4efb322de510815ea7"
|
sha256: "9d7d5ae5f98a5727f2580fad73062f2484f400eef6cef42919413268e62a363e"
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.1"
|
version: "0.1.2"
|
||||||
audio_session:
|
audio_session:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -875,7 +875,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: media_kit
|
path: media_kit
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "7775f8b1aa5ec77815d5739bf25549fe37f17cae"
|
resolved-ref: "285f7919bbf4a7d89a62615b14a3766a171ad575"
|
||||||
url: "https://github.com/media-kit/media-kit"
|
url: "https://github.com/media-kit/media-kit"
|
||||||
source: git
|
source: git
|
||||||
version: "1.1.10+1"
|
version: "1.1.10+1"
|
||||||
@ -916,7 +916,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "libs/universal/media_kit_libs_video"
|
path: "libs/universal/media_kit_libs_video"
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "7775f8b1aa5ec77815d5739bf25549fe37f17cae"
|
resolved-ref: "285f7919bbf4a7d89a62615b14a3766a171ad575"
|
||||||
url: "https://github.com/media-kit/media-kit"
|
url: "https://github.com/media-kit/media-kit"
|
||||||
source: git
|
source: git
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
@ -941,7 +941,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: media_kit_video
|
path: media_kit_video
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: "7775f8b1aa5ec77815d5739bf25549fe37f17cae"
|
resolved-ref: "285f7919bbf4a7d89a62615b14a3766a171ad575"
|
||||||
url: "https://github.com/media-kit/media-kit"
|
url: "https://github.com/media-kit/media-kit"
|
||||||
source: git
|
source: git
|
||||||
version: "1.2.4"
|
version: "1.2.4"
|
||||||
|
|||||||
@ -90,8 +90,8 @@ dependencies:
|
|||||||
media_kit_libs_video: ^1.0.4
|
media_kit_libs_video: ^1.0.4
|
||||||
|
|
||||||
# 媒体通知
|
# 媒体通知
|
||||||
audio_service: ^0.18.12
|
audio_service: ^0.18.13
|
||||||
audio_session: ^0.1.16
|
audio_session: ^0.1.18
|
||||||
|
|
||||||
# 音量、亮度、屏幕控制
|
# 音量、亮度、屏幕控制
|
||||||
flutter_volume_controller: ^1.3.1
|
flutter_volume_controller: ^1.3.1
|
||||||
|
|||||||
Reference in New Issue
Block a user