Update
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:core';
|
||||
import 'dart:math';
|
||||
import 'dart:ui';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:fijkplayer/fijkplayer.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -15,7 +16,7 @@ import '../components/commonFun.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../provider/player_ratio.dart';
|
||||
import 'my_slider.dart';
|
||||
import '../my_extended_image/common/image_picker/_image_picker_io.dart';
|
||||
// import '../my_extended_image/common/image_picker/_image_picker_io.dart';
|
||||
import '../services/Storage.dart';
|
||||
|
||||
// class MyFijkPanelWidgetBuilder extends StatefulWidget {
|
||||
@@ -51,7 +52,7 @@ FijkPanelWidgetBuilder fijkPanel2Builder3(
|
||||
texPos: texturePos,
|
||||
fill: fill,
|
||||
doubleTap: doubleTap,
|
||||
snapShot: snapShot,
|
||||
snapShot: Platform.isIOS ? false : snapShot,
|
||||
hideDuration: duration,
|
||||
);
|
||||
};
|
||||
@@ -494,13 +495,13 @@ class MyFijkPanelWidgetBuilderState extends State<MyFijkPanelWidgetBuilder>
|
||||
});
|
||||
FijkLog.d("get snapshot succeed");
|
||||
|
||||
//Uint8List fileData;
|
||||
String fileFath;
|
||||
ImageSaver.save('extended_image_cropped_image.jpg', v).then((value) {
|
||||
fileFath = value;
|
||||
// var fileFath = await ImagePickerSaver.saveFile(fileData: fileData);
|
||||
print('my save fileFath : $fileFath');
|
||||
});
|
||||
// //Uint8List fileData;
|
||||
// String fileFath;
|
||||
// ImageSaver.save('extended_image_cropped_image.jpg', v).then((value) {
|
||||
// fileFath = value;
|
||||
// // var fileFath = await ImagePickerSaver.saveFile(fileData: fileData);
|
||||
// print('my save fileFath : $fileFath');
|
||||
// });
|
||||
}).catchError((e) {
|
||||
FijkLog.d("get snapshot failed");
|
||||
});
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package io.flutter.plugins;
|
||||
|
||||
import io.flutter.plugin.common.PluginRegistry;
|
||||
import com.baidu.flutter_bmfbase.FlutterBmfbasePlugin;
|
||||
import com.baidu.flutter_bmfmap.FlutterBmfmapPlugin;
|
||||
|
||||
/**
|
||||
* Generated file. Do not edit.
|
||||
*/
|
||||
public final class GeneratedPluginRegistrant {
|
||||
public static void registerWith(PluginRegistry registry) {
|
||||
if (alreadyRegisteredWith(registry)) {
|
||||
return;
|
||||
}
|
||||
FlutterBmfbasePlugin.registerWith(registry.registrarFor("com.baidu.flutter_bmfbase.FlutterBmfbasePlugin"));
|
||||
FlutterBmfmapPlugin.registerWith(registry.registrarFor("com.baidu.flutter_bmfmap.FlutterBmfmapPlugin"));
|
||||
}
|
||||
|
||||
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
|
||||
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
|
||||
if (registry.hasPlugin(key)) {
|
||||
return true;
|
||||
}
|
||||
registry.registrarFor(key);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6
|
||||
FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_bmfmap-1.0.2
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||
OTHER_LDFLAGS=$(inherited) -framework Flutter
|
||||
FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios
|
||||
FLUTTER_BUILD_NAME=1.0.2
|
||||
FLUTTER_BUILD_NUMBER=1.0.2
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=false
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=.packages
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_bmfmap-1.0.2"
|
||||
export "FLUTTER_TARGET=lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
|
||||
export "FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios"
|
||||
export "FLUTTER_BUILD_NAME=1.0.2"
|
||||
export "FLUTTER_BUILD_NUMBER=1.0.2"
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=false"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=.packages"
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
#ifndef GeneratedPluginRegistrant_h
|
||||
#define GeneratedPluginRegistrant_h
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GeneratedPluginRegistrant : NSObject
|
||||
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif /* GeneratedPluginRegistrant_h */
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
|
||||
#if __has_include(<flutter_bmfbase/FlutterBmfbasePlugin.h>)
|
||||
#import <flutter_bmfbase/FlutterBmfbasePlugin.h>
|
||||
#else
|
||||
@import flutter_bmfbase;
|
||||
#endif
|
||||
|
||||
#if __has_include(<flutter_bmfmap/FlutterBmfmapPlugin.h>)
|
||||
#import <flutter_bmfmap/FlutterBmfmapPlugin.h>
|
||||
#else
|
||||
@import flutter_bmfmap;
|
||||
#endif
|
||||
|
||||
@implementation GeneratedPluginRegistrant
|
||||
|
||||
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
|
||||
[FlutterBmfbasePlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBmfbasePlugin"]];
|
||||
[FlutterBmfmapPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterBmfmapPlugin"]];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,2 +1,2 @@
|
||||
sdk.dir=S:\\Android\\Android-SDK-Windows
|
||||
flutter.sdk=R:\\Flutter\\FlutterSDK\\1.22.6
|
||||
sdk.dir=/Users/mlch911/Library/Android/sdk
|
||||
flutter.sdk=/Users/mlch911/fvm/versions/1.22.6
|
||||
@@ -0,0 +1,14 @@
|
||||
// This is a generated file; do not edit or check into version control.
|
||||
FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6
|
||||
FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_drag_scale/example
|
||||
FLUTTER_TARGET=lib/main.dart
|
||||
FLUTTER_BUILD_DIR=build
|
||||
SYMROOT=${SOURCE_ROOT}/../build/ios
|
||||
OTHER_LDFLAGS=$(inherited) -framework Flutter
|
||||
FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios
|
||||
FLUTTER_BUILD_NAME=1.0.0
|
||||
FLUTTER_BUILD_NUMBER=1
|
||||
DART_OBFUSCATION=false
|
||||
TRACK_WIDGET_CREATION=false
|
||||
TREE_SHAKE_ICONS=false
|
||||
PACKAGE_CONFIG=.packages
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
export "FLUTTER_ROOT=/Users/mlch911/fvm/versions/1.22.6"
|
||||
export "FLUTTER_APPLICATION_PATH=/Users/mlch911/Documents/Programming/flutter/hyzp_ybqx/lib/my_flutter_drag_scale/example"
|
||||
export "FLUTTER_TARGET=lib/main.dart"
|
||||
export "FLUTTER_BUILD_DIR=build"
|
||||
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
|
||||
export "FLUTTER_FRAMEWORK_DIR=/Users/mlch911/fvm/versions/1.22.6/bin/cache/artifacts/engine/ios"
|
||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||
export "FLUTTER_BUILD_NUMBER=1"
|
||||
export "DART_OBFUSCATION=false"
|
||||
export "TRACK_WIDGET_CREATION=false"
|
||||
export "TREE_SHAKE_ICONS=false"
|
||||
export "PACKAGE_CONFIG=.packages"
|
||||
@@ -5,56 +5,56 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0-nullsafety.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.3"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0-nullsafety.3"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
flutter:
|
||||
@@ -78,21 +78,21 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.10-nullsafety.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.1"
|
||||
sky_engine:
|
||||
@@ -104,56 +104,56 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0-nullsafety.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.19-nullsafety.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.3"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.3"
|
||||
sdks:
|
||||
|
||||
@@ -5,49 +5,49 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.5.0-nullsafety.1"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.3"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0-nullsafety.3"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
flutter:
|
||||
@@ -64,21 +64,21 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.10-nullsafety.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.1"
|
||||
sky_engine:
|
||||
@@ -90,56 +90,56 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0-nullsafety.2"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0-nullsafety.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.1"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0-nullsafety.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0-nullsafety.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.19-nullsafety.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0-nullsafety.3"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0-nullsafety.3"
|
||||
sdks:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:ui';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:fijkplayer/fijkplayer.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -14,12 +13,13 @@ import 'package:hyzp_ybqx/components/dioFun.dart';
|
||||
import 'package:hyzp_ybqx/provider/player_ratio.dart';
|
||||
import 'package:hyzp_ybqx/provider/player_region.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:fijkplayer/fijkplayer.dart';
|
||||
|
||||
import '../components/commonFun.dart';
|
||||
import '../services/Storage.dart';
|
||||
import '../my_fijkPanel_fix/my_panel3.dart';
|
||||
|
||||
const _kControlViewTypes = [kControlViewTypeDefault, kControlViewTypeWithout];
|
||||
|
||||
class SuperPlayerPage extends StatefulWidget {
|
||||
SuperPlayerPage(
|
||||
{@required this.url,
|
||||
@@ -62,10 +62,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||
_playerController.release(); // 必须显示释放视频播放资源,否则即使退出视频播放页面后台还在获取视频流
|
||||
super.dispose();
|
||||
_ijkPlayer.release();
|
||||
_playerController.resetPlayer();
|
||||
_playerController.release();
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -119,7 +115,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
// await _playerController.setOption(FijkOption.hostCategory, "request-screen-on", 1);
|
||||
// await _playerController.setOption(FijkOption.hostCategory, "request-audio-focus", 1);
|
||||
}
|
||||
}
|
||||
|
||||
await _playerController.setDataSource(widget.url, autoPlay: true).catchError((e) {
|
||||
print("setDataSource error: $e");
|
||||
@@ -154,7 +149,15 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
// }
|
||||
|
||||
SuperPlayerModel get testSuperPlayerModel {
|
||||
return SuperPlayerModel(url: widget.url);
|
||||
// int appId = 1252463788;
|
||||
// String fileId = "5285890781763144364";
|
||||
|
||||
SuperPlayerModel superPlayerModel = SuperPlayerModel(
|
||||
url: widget.url,
|
||||
// appId: appId,
|
||||
// videoId: SuperPlayerVideoId(fileId: fileId),
|
||||
);
|
||||
return superPlayerModel;
|
||||
}
|
||||
|
||||
// Platform messages are asynchronous, so we initialize in an async method.
|
||||
@@ -214,6 +217,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
double _outerRadius = 270;
|
||||
double _innerRadius = _outerRadius / 2;
|
||||
|
||||
//double barHeight = bFullScreen ? 0 : MediaQueryData.fromWindow(window).padding.top;
|
||||
return Scaffold(
|
||||
appBar: bFullScreen
|
||||
? null
|
||||
@@ -224,9 +228,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
titleSpacing: 0.0,
|
||||
//设置title的左边距
|
||||
flexibleSpace: Container(
|
||||
//SizedBox(height: ScreenUtil().statusBarHeight), //显示顶部状态栏
|
||||
// SizedBox(height: ScreenUtil().setHeight(10)), //显示顶部状态栏
|
||||
padding: EdgeInsets.only(top: ScreenUtil().statusBarHeight), //留出顶部状态栏高度
|
||||
child: Container(
|
||||
//height: ScreenUtil().setHeight(173),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
@@ -237,6 +245,12 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
],
|
||||
),
|
||||
),
|
||||
// decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(colors: [
|
||||
// Color(0xFF0018EB),
|
||||
// Color(0xFF01C1D9),
|
||||
// ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
|
||||
// ),
|
||||
),
|
||||
),
|
||||
title: Padding(
|
||||
@@ -249,7 +263,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
iconData: Icons.chevron_left_outlined,
|
||||
onPress: () {
|
||||
getingDwVideo = false;
|
||||
pop();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
@@ -266,12 +280,16 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
),
|
||||
body: WillPopScope(
|
||||
child: Container(
|
||||
// height: ScreenUtil().screenHeight -
|
||||
// ScreenUtil().statusBarHeight -
|
||||
// ScreenUtil().bottomBarHeight,
|
||||
color: Color.fromRGBO(224, 224, 224, 1),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
//第2行组件,视频播放区
|
||||
Center(
|
||||
child: Container(
|
||||
//padding: EdgeInsets.only(top: barHeight),
|
||||
alignment: Alignment(0, -1),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.width * (9 / 16),
|
||||
@@ -315,6 +333,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
children: [
|
||||
SizedBox(width: ScreenUtil().setWidth(btn_left)),
|
||||
getRoundButton(
|
||||
//(bPlaying) ? '暂停' : '播放',
|
||||
text: playerRegionProvide.playerText,
|
||||
icon: playerRegionProvide.playerIcon,
|
||||
diameter: 130,
|
||||
@@ -467,27 +486,41 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
}
|
||||
},
|
||||
),
|
||||
// child: GridView.custom(
|
||||
// // padding: EdgeInsets.only(
|
||||
// // left: ScreenUtil().setWidth(35), right: ScreenUtil().setWidth(35)),
|
||||
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
// crossAxisCount: btnCount3,
|
||||
// mainAxisSpacing: 0,
|
||||
// crossAxisSpacing: 1,
|
||||
// childAspectRatio: ratio3,
|
||||
// ),
|
||||
// childrenDelegate: SliverChildBuilderDelegate((context, position) {
|
||||
// return getItemContainer(listData[position]);
|
||||
// }, childCount: btnCount3)),
|
||||
),
|
||||
//SizedBox(height: ScreenUtil().setHeight(49)),
|
||||
//Divider(color: Colors.blue),
|
||||
//第4行组件,分隔栏
|
||||
// Container(
|
||||
// //height: 11,
|
||||
// height: ScreenUtil().setHeight(28),
|
||||
// color: Color.fromRGBO(224, 224, 224, 1),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
onWillPop: () {
|
||||
Playing = false;
|
||||
getingDwVideo = false;
|
||||
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
|
||||
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 1);
|
||||
pop();
|
||||
Navigator.pop(context); //关闭弹框,播放输入视频地址
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
pop() async {
|
||||
Playing = false;
|
||||
getingDwVideo = false;
|
||||
_ijkPlayer.removeListener(() {});
|
||||
await _playerController.removeListener(this);
|
||||
Navigator.pop(context);
|
||||
}
|
||||
|
||||
@override
|
||||
void onClickFloatCloseBtn() {
|
||||
_addLog('onClickFloatCloseBtn', {});
|
||||
@@ -496,14 +529,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
@override
|
||||
void onClickSmallReturnBtn() {
|
||||
_addLog('onClickSmallReturnBtn', {});
|
||||
pop();
|
||||
Navigator.maybePop(context);
|
||||
}
|
||||
|
||||
@override
|
||||
void onFullScreenChange(bool isFullScreen) {
|
||||
_addLog('onFullScreenChange', {'isFullScreen': isFullScreen});
|
||||
if (bFullScreen == isFullScreen) return;
|
||||
bFullScreen = isFullScreen;
|
||||
bFullScreen = !bFullScreen;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@@ -542,12 +574,6 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
_addLog('onStartFloatWindowPlay', {});
|
||||
}
|
||||
|
||||
void _fijkValueListener() {
|
||||
FijkValue value = _ijkPlayer.value;
|
||||
onPlayStateChange(value.state == FijkState.started ? 1 : 2);
|
||||
onFullScreenChange(value.fullScreen);
|
||||
}
|
||||
|
||||
//生成圆形按钮部件,基于图标
|
||||
Widget getRoundButton(
|
||||
{double diameter = 144,
|
||||
@@ -606,7 +632,13 @@ class _SuperPlayerPageState extends State<SuperPlayerPage>
|
||||
child: Image.asset(image_path,
|
||||
fit: BoxFit.fitWidth,
|
||||
width: ScreenUtil().setWidth(imageSize),
|
||||
//height: ScreenUtil().setWidth(iconSize),
|
||||
color: Color.fromRGBO(52, 157, 237, 1)),
|
||||
// child: Icon(
|
||||
// icon,
|
||||
// size: ScreenUtil().setWidth(iconSize),
|
||||
// color: Color.fromRGBO(52, 157, 237, 1),
|
||||
// ),
|
||||
decoration: BoxDecoration(
|
||||
color: color_bkg,
|
||||
borderRadius: BorderRadius.all(Radius.circular(200)),
|
||||
|
||||
Reference in New Issue
Block a user