From 329db4a3d428d0e2df7e8c259837e6a98c3348a0 Mon Sep 17 00:00:00 2001 From: lyb5834 Date: Tue, 3 Jan 2023 10:58:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=85=A8=E5=B1=8F?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99tabbar=E4=B8=8D=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决全屏的时候tabbar不隐藏的bug --- lib/core/fijkview.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/fijkview.dart b/lib/core/fijkview.dart index 95644df6..23f0eaee 100644 --- a/lib/core/fijkview.dart +++ b/lib/core/fijkview.dart @@ -227,7 +227,10 @@ class _FijkViewState extends State { _fullScreen = true; await _pushFullScreenWidget(context); } else if (_fullScreen && !value.fullScreen) { - Navigator.of(context).pop(); + await SystemChrome.setEnabledSystemUIOverlays( + [SystemUiOverlay.top, SystemUiOverlay.bottom]); + await FijkPlugin.setOrientationPortrait(); + Navigator.of(context, rootNavigator: true).pop(); _fullScreen = false; } @@ -303,7 +306,7 @@ class _FijkViewState extends State { } FijkLog.d("screen orientation changed:$changed"); - await Navigator.of(context).push(route); + await Navigator.of(context, rootNavigator: true).push(route); _fullScreen = false; widget.player.exitFullScreen(); await SystemChrome.setEnabledSystemUIOverlays( From fb7be8cf743f8268b82e69101e9e44d62a7abe87 Mon Sep 17 00:00:00 2001 From: yuanbo li Date: Wed, 22 Mar 2023 17:21:48 +0800 Subject: [PATCH 2/3] cover fit change --- .gitignore | 3 + example/ios/Podfile.lock | 12 +- example/ios/Runner.xcodeproj/project.pbxproj | 12 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/Info.plist | 2 + example/pubspec.lock | 283 +++++++++--------- lib/core/fijkview.dart | 18 +- pubspec.lock | 68 ++--- 8 files changed, 214 insertions(+), 186 deletions(-) diff --git a/.gitignore b/.gitignore index 76c0e047..7842bc28 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ doc/api/ .project .classpath org.eclipse.buildship.core.prefs +example/ios/Podfile.lock +example/ios/Podfile.lock +*.lock diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3764b859..8f7287cd 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -4,13 +4,13 @@ PODS: - BIJKPlayer (~> 0.7.16) - Flutter - Flutter (1.0.0) - - shared_preferences (0.0.1): + - shared_preferences_ios (0.0.1): - Flutter DEPENDENCIES: - fijkplayer (from `.symlinks/plugins/fijkplayer/ios`) - Flutter (from `Flutter`) - - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) + - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) SPEC REPOS: trunk: @@ -21,15 +21,15 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/fijkplayer/ios" Flutter: :path: Flutter - shared_preferences: - :path: ".symlinks/plugins/shared_preferences/ios" + shared_preferences_ios: + :path: ".symlinks/plugins/shared_preferences_ios/ios" SPEC CHECKSUMS: BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64 fijkplayer: 5ecf78e80cb97eed64cc170b094a4f691d9b9691 Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a - shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d + shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad PODFILE CHECKSUM: b1f7a399522c118a74b177b13c01eca692aa7e6d -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index dd784485..458fa8ee 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -166,12 +166,12 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 7SUQ9UM9P2; + DevelopmentTeam = 8CSXJZUPG2; ProvisioningStyle = Automatic; }; }; @@ -352,7 +352,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 7SUQ9UM9P2; + DEVELOPMENT_TEAM = 8CSXJZUPG2; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -521,7 +521,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 7SUQ9UM9P2; + DEVELOPMENT_TEAM = 8CSXJZUPG2; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -586,7 +586,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 7SUQ9UM9P2; + DEVELOPMENT_TEAM = 8CSXJZUPG2; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index fb2dffc4..c87d15a3 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/example/pubspec.lock b/example/pubspec.lock index ef3d6c49..4a9aca32 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,114 +5,107 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "31.0.0" + version: "47.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.0" + version: "4.7.0" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.2" + version: "3.1.11" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.1" + version: "2.3.1" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.15.0" + version: "1.16.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.1" + version: "3.1.0" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "1.2.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.1" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.1" + version: "2.0.1" fijkplayer: dependency: "direct dev" description: @@ -124,7 +117,7 @@ packages: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.2" flutter: @@ -151,9 +144,9 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.2" + version: "2.1.3" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -163,219 +156,233 @@ packages: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "2.1.0" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.1" + version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "4.0.0" + version: "4.0.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.0.3" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.6.3" + version: "0.6.4" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "1.1.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.4" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.7.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.0.3" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0" + version: "1.8.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.7" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" + version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.1" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.0" + version: "2.1.3" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.3" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.5.0" + version: "1.5.1" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "4.2.3" + version: "4.2.4" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.3" shared_preferences: dependency: transitive description: name: shared_preferences - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.6" + version: "2.0.15" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.14" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.2" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.0.4" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.2" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.4" + version: "1.4.0" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.0" + version: "3.0.1" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.1.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "1.0.3" sky_engine: dependency: transitive description: flutter @@ -385,156 +392,156 @@ packages: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.1" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.10.10" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" streaming_shared_preferences: dependency: "direct main" description: name: streaming_shared_preferences - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" sync_http: dependency: transitive description: name: sync_http - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "0.3.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.17.10" + version: "1.21.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.2" + version: "0.4.9" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.0" + version: "0.4.13" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.2" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "7.1.1" + version: "8.2.2" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.2.0" webdriver: dependency: transitive description: name: webdriver - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.2.0" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.5" + version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.0" + version: "0.2.0+2" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "3.1.0" + version: "3.1.1" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.20.0" + dart: ">=2.17.0 <3.0.0" + flutter: ">=3.0.0" diff --git a/lib/core/fijkview.dart b/lib/core/fijkview.dart index 23f0eaee..0ba4249d 100644 --- a/lib/core/fijkview.dart +++ b/lib/core/fijkview.dart @@ -560,7 +560,7 @@ class __InnerFijkViewState extends State<_InnerFijkView> { rect: pos, child: Image( image: widget.cover!, - fit: BoxFit.fill, + fit: _convertVideoFitToBoxFit(_fit), ), )); } @@ -573,4 +573,20 @@ class __InnerFijkViewState extends State<_InnerFijkView> { ); }); } + + BoxFit _convertVideoFitToBoxFit(FijkFit originFit) { + if (originFit == FijkFit.contain) { + return BoxFit.contain; + } else if (originFit == FijkFit.fill) { + return BoxFit.fill; + } else if (originFit == FijkFit.fitWidth) { + return BoxFit.fitWidth; + } else if (originFit == FijkFit.fitHeight) { + return BoxFit.fitHeight; + } else if (originFit == FijkFit.cover) { + return BoxFit.cover; + }else { + return BoxFit.fitWidth; + } + } } diff --git a/pubspec.lock b/pubspec.lock index d850674f..e9f46c36 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,51 +5,51 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.15.0" + version: "1.16.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.3.0" flutter: dependency: "direct main" description: flutter @@ -64,23 +64,30 @@ packages: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.10" + version: "0.1.4" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.7.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -90,58 +97,51 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.2" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.9" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.2" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=1.12.0" From 7ffd6eb3c1c68284d9c274eaa32a352285eb6857 Mon Sep 17 00:00:00 2001 From: yuanbo li Date: Wed, 22 Mar 2023 17:47:51 +0800 Subject: [PATCH 3/3] Update fijkview.dart --- lib/core/fijkview.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/core/fijkview.dart b/lib/core/fijkview.dart index 0ba4249d..6977b175 100644 --- a/lib/core/fijkview.dart +++ b/lib/core/fijkview.dart @@ -124,6 +124,7 @@ class FijkView extends StatefulWidget { this.panelBuilder = defaultFijkPanelBuilder, this.color = const Color(0xFF607D8B), this.cover, + this.coverWidget, this.fs = true, this.onDispose, }); @@ -170,6 +171,9 @@ class FijkView extends StatefulWidget { /// But you can still call [FijkPlayer.enterFullScreen] and [FijkPlayer.exitFullScreen] and make your own full screen pages. final bool fs; + /// 封面 cover widget + final Widget? coverWidget; + @override createState() => _FijkViewState(); } @@ -337,6 +341,7 @@ class _FijkViewState extends State { fijkViewState: this, fullScreen: false, cover: widget.cover, + coverWidget: widget.coverWidget, data: _fijkData, ), ); @@ -349,12 +354,14 @@ class _InnerFijkView extends StatefulWidget { required this.fullScreen, required this.cover, required this.data, + this.coverWidget, }); final _FijkViewState fijkViewState; final bool fullScreen; final ImageProvider? cover; final FijkData data; + final Widget? coverWidget; @override __InnerFijkViewState createState() => __InnerFijkViewState(); @@ -565,6 +572,10 @@ class __InnerFijkViewState extends State<_InnerFijkView> { )); } + if (widget.coverWidget != null && !value.videoRenderStart) { + ws.add(Positioned.fromRect(rect: pos, child: widget.coverWidget!)); + } + if (_panelBuilder != null) { ws.add(_panelBuilder!(_player, data, ctx, constraints.biggest, pos)); } @@ -585,7 +596,7 @@ class __InnerFijkViewState extends State<_InnerFijkView> { return BoxFit.fitHeight; } else if (originFit == FijkFit.cover) { return BoxFit.cover; - }else { + } else { return BoxFit.fitWidth; } }