Compare commits
30 Commits
feature-pl
...
feature-me
Author | SHA1 | Date | |
---|---|---|---|
b689db16b5 | |||
5cb3e578a8 | |||
8f9fbf5d41 | |||
9845f0383a | |||
fb3be848b4 | |||
7d7df17317 | |||
aae08d0688 | |||
9fe5b78cfa | |||
6b028c36af | |||
92c385ff58 | |||
463ee1d5b5 | |||
0a416c95bc | |||
3d09d80007 | |||
fffa15faa3 | |||
d6b972a8ab | |||
d6fd299395 | |||
1953653044 | |||
9faa625d52 | |||
7e7bb1f43a | |||
a925ef63eb | |||
f8326e7cb5 | |||
02d2598d01 | |||
77b509fd17 | |||
11e907d74b | |||
6298711528 | |||
0f0546ae59 | |||
76784ee664 | |||
2dbef3fee2 | |||
3a66c8c03d | |||
6f62837495 |
@ -9,6 +9,7 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- ReachabilitySwift
|
- ReachabilitySwift
|
||||||
- device_info_plus (0.0.1):
|
- device_info_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
@ -38,7 +39,7 @@ PODS:
|
|||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- permission_handler_apple (9.1.1):
|
- permission_handler_apple (9.3.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- ReachabilitySwift (5.0.0)
|
- ReachabilitySwift (5.0.0)
|
||||||
- saver_gallery (0.0.1):
|
- saver_gallery (0.0.1):
|
||||||
@ -71,7 +72,7 @@ DEPENDENCIES:
|
|||||||
- audio_service (from `.symlinks/plugins/audio_service/ios`)
|
- audio_service (from `.symlinks/plugins/audio_service/ios`)
|
||||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||||
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
|
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
|
||||||
@ -113,7 +114,7 @@ EXTERNAL SOURCES:
|
|||||||
auto_orientation:
|
auto_orientation:
|
||||||
:path: ".symlinks/plugins/auto_orientation/ios"
|
:path: ".symlinks/plugins/auto_orientation/ios"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
:path: ".symlinks/plugins/connectivity_plus/darwin"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
:path: ".symlinks/plugins/device_info_plus/ios"
|
||||||
Flutter:
|
Flutter:
|
||||||
@ -166,7 +167,7 @@ SPEC CHECKSUMS:
|
|||||||
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
|
audio_service: f509d65da41b9521a61f1c404dd58651f265a567
|
||||||
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
|
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
|
||||||
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
||||||
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
|
connectivity_plus: e2dad488011aeb593e219360e804c43cc1af5770
|
||||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
|
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
|
||||||
@ -180,7 +181,7 @@ SPEC CHECKSUMS:
|
|||||||
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
|
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e
|
||||||
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
|
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
|
||||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||||
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
||||||
saver_gallery: 2b4e584106fde2407ab51560f3851564963e6b78
|
saver_gallery: 2b4e584106fde2407ab51560f3851564963e6b78
|
||||||
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
|
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
|
||||||
@ -193,7 +194,7 @@ SPEC CHECKSUMS:
|
|||||||
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
|
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
|
||||||
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
|
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
|
||||||
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
|
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
|
||||||
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
|
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4
|
||||||
|
|
||||||
PODFILE CHECKSUM: 637cd290bed23275b5f5ffcc7eb1e73d0a5fb2be
|
PODFILE CHECKSUM: 637cd290bed23275b5f5ffcc7eb1e73d0a5fb2be
|
||||||
|
|
||||||
|
@ -437,7 +437,8 @@ class SearchArticleItemModel {
|
|||||||
pubTime = json['pub_time'];
|
pubTime = json['pub_time'];
|
||||||
like = json['like'];
|
like = json['like'];
|
||||||
title = Em.regTitle(json['title']);
|
title = Em.regTitle(json['title']);
|
||||||
subTitle = json['title'].replaceAll(RegExp(r'<[^>]*>'), '');
|
subTitle =
|
||||||
|
Em.decodeHtmlEntities(json['title'].replaceAll(RegExp(r'<[^>]*>'), ''));
|
||||||
rankOffset = json['rank_offset'];
|
rankOffset = json['rank_offset'];
|
||||||
mid = json['mid'];
|
mid = json['mid'];
|
||||||
imageUrls = json['image_urls'];
|
imageUrls = json['image_urls'];
|
||||||
|
@ -185,7 +185,7 @@ class HistoryItem extends StatelessWidget {
|
|||||||
? '已看完'
|
? '已看完'
|
||||||
: '${Utils.timeFormat(videoItem.progress!)}/${Utils.timeFormat(videoItem.duration!)}',
|
: '${Utils.timeFormat(videoItem.progress!)}/${Utils.timeFormat(videoItem.duration!)}',
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
bottom: 6.0,
|
bottom: 8.0,
|
||||||
type: 'gray',
|
type: 'gray',
|
||||||
),
|
),
|
||||||
// 右上角
|
// 右上角
|
||||||
@ -258,6 +258,24 @@ class HistoryItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 3,
|
||||||
|
right: 3,
|
||||||
|
bottom: 0,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft:
|
||||||
|
Radius.circular(StyleString.imgRadius.x),
|
||||||
|
bottomRight:
|
||||||
|
Radius.circular(StyleString.imgRadius.x),
|
||||||
|
),
|
||||||
|
child: LinearProgressIndicator(
|
||||||
|
value: videoItem.progress == -1
|
||||||
|
? 100
|
||||||
|
: videoItem.progress / videoItem.duration,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
VideoContent(videoItem: videoItem, ctr: ctr)
|
VideoContent(videoItem: videoItem, ctr: ctr)
|
||||||
|
@ -50,21 +50,5 @@ class RankController extends GetxController with GetTickerProviderStateMixin {
|
|||||||
length: tabs.length,
|
length: tabs.length,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
// 监听 tabController 切换
|
|
||||||
if (enableGradientBg) {
|
|
||||||
tabController.animation!.addListener(() {
|
|
||||||
if (tabController.indexIsChanging) {
|
|
||||||
if (initialIndex.value != tabController.index) {
|
|
||||||
initialIndex.value = tabController.index;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
final int temp = tabController.animation!.value.round();
|
|
||||||
if (initialIndex.value != temp) {
|
|
||||||
initialIndex.value = temp;
|
|
||||||
tabController.index = initialIndex.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:expandable/expandable.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -15,7 +16,7 @@ import 'package:pilipala/pages/video/detail/widgets/ai_detail.dart';
|
|||||||
import 'package:pilipala/utils/feed_back.dart';
|
import 'package:pilipala/utils/feed_back.dart';
|
||||||
import 'package:pilipala/utils/storage.dart';
|
import 'package:pilipala/utils/storage.dart';
|
||||||
import 'package:pilipala/utils/utils.dart';
|
import 'package:pilipala/utils/utils.dart';
|
||||||
import '../widgets/expandable_section.dart';
|
import '../../../../http/user.dart';
|
||||||
import 'widgets/action_item.dart';
|
import 'widgets/action_item.dart';
|
||||||
import 'widgets/fav_panel.dart';
|
import 'widgets/fav_panel.dart';
|
||||||
import 'widgets/intro_detail.dart';
|
import 'widgets/intro_detail.dart';
|
||||||
@ -139,6 +140,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
late bool enableAi;
|
late bool enableAi;
|
||||||
bool isProcessing = false;
|
bool isProcessing = false;
|
||||||
RxBool isExpand = false.obs;
|
RxBool isExpand = false.obs;
|
||||||
|
late ExpandableController _expandableCtr;
|
||||||
|
|
||||||
void Function()? handleState(Future Function() action) {
|
void Function()? handleState(Future Function() action) {
|
||||||
return isProcessing
|
return isProcessing
|
||||||
? null
|
? null
|
||||||
@ -162,6 +165,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
follower = Utils.numFormat(videoIntroController.userStat['follower']);
|
follower = Utils.numFormat(videoIntroController.userStat['follower']);
|
||||||
followStatus = videoIntroController.followStatus;
|
followStatus = videoIntroController.followStatus;
|
||||||
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
|
enableAi = setting.get(SettingBoxKey.enableAi, defaultValue: true);
|
||||||
|
_expandableCtr = ExpandableController(initialExpanded: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收藏
|
// 收藏
|
||||||
@ -215,6 +219,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
showIntroDetail() {
|
showIntroDetail() {
|
||||||
feedBack();
|
feedBack();
|
||||||
isExpand.value = !(isExpand.value);
|
isExpand.value = !(isExpand.value);
|
||||||
|
_expandableCtr.toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 用户主页
|
// 用户主页
|
||||||
@ -238,6 +243,12 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_expandableCtr.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final ThemeData t = Theme.of(context);
|
final ThemeData t = Theme.of(context);
|
||||||
@ -255,14 +266,34 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.translucent,
|
behavior: HitTestBehavior.translucent,
|
||||||
onTap: () => showIntroDetail(),
|
onTap: () => showIntroDetail(),
|
||||||
child: Text(
|
child: ExpandablePanel(
|
||||||
widget.videoDetail!.title!,
|
controller: _expandableCtr,
|
||||||
style: const TextStyle(
|
collapsed: Text(
|
||||||
fontSize: 18,
|
widget.videoDetail!.title!,
|
||||||
fontWeight: FontWeight.bold,
|
softWrap: true,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
expanded: Text(
|
||||||
|
widget.videoDetail!.title!,
|
||||||
|
softWrap: true,
|
||||||
|
maxLines: 4,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
theme: const ExpandableThemeData(
|
||||||
|
animationDuration: Duration(milliseconds: 300),
|
||||||
|
scrollAnimationDuration: Duration(milliseconds: 300),
|
||||||
|
crossFadePoint: 0,
|
||||||
|
fadeCurve: Curves.ease,
|
||||||
|
sizeCurve: Curves.linear,
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Stack(
|
Stack(
|
||||||
@ -327,12 +358,16 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
|
|
||||||
/// 视频简介
|
/// 视频简介
|
||||||
Obx(
|
ExpandablePanel(
|
||||||
() => ExpandedSection(
|
controller: _expandableCtr,
|
||||||
expand: isExpand.value,
|
collapsed: const SizedBox(height: 0),
|
||||||
begin: 0,
|
expanded: IntroDetail(videoDetail: widget.videoDetail!),
|
||||||
end: 1,
|
theme: const ExpandableThemeData(
|
||||||
child: IntroDetail(videoDetail: widget.videoDetail!),
|
animationDuration: Duration(milliseconds: 300),
|
||||||
|
scrollAnimationDuration: Duration(milliseconds: 300),
|
||||||
|
crossFadePoint: 0,
|
||||||
|
fadeCurve: Curves.ease,
|
||||||
|
sizeCurve: Curves.linear,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -479,7 +514,11 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
),
|
),
|
||||||
ActionItem(
|
ActionItem(
|
||||||
icon: const Icon(FontAwesomeIcons.clock),
|
icon: const Icon(FontAwesomeIcons.clock),
|
||||||
onTap: () => videoIntroController.actionShareVideo(),
|
onTap: () async {
|
||||||
|
final res =
|
||||||
|
await UserHttp.toViewLater(bvid: widget.videoDetail!.bvid);
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
},
|
||||||
selectStatus: false,
|
selectStatus: false,
|
||||||
text: '稍后看',
|
text: '稍后看',
|
||||||
),
|
),
|
||||||
|
@ -149,13 +149,16 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
delegate: _MySliverPersistentHeaderDelegate(
|
delegate: _MySliverPersistentHeaderDelegate(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
padding: const EdgeInsets.fromLTRB(12, 6, 6, 0),
|
padding: const EdgeInsets.fromLTRB(12, 0, 6, 0),
|
||||||
|
color: Theme.of(context).colorScheme.surface,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Obx(
|
||||||
'${_videoReplyController.sortTypeLabel.value}评论',
|
() => Text(
|
||||||
style: const TextStyle(fontSize: 13),
|
'${_videoReplyController.sortTypeLabel.value}评论',
|
||||||
|
style: const TextStyle(fontSize: 13),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 35,
|
height: 35,
|
||||||
|
@ -376,6 +376,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
false)
|
false)
|
||||||
? SvgPicture.asset(
|
? SvgPicture.asset(
|
||||||
'assets/images/video/danmu_close.svg',
|
'assets/images/video/danmu_close.svg',
|
||||||
|
// ignore: deprecated_member_use
|
||||||
|
color:
|
||||||
|
Theme.of(context).colorScheme.outline,
|
||||||
)
|
)
|
||||||
: SvgPicture.asset(
|
: SvgPicture.asset(
|
||||||
'assets/images/video/danmu_open.svg',
|
'assets/images/video/danmu_open.svg',
|
||||||
|
@ -393,7 +393,13 @@ class PlPlayerController {
|
|||||||
}
|
}
|
||||||
// 配置Player 音轨、字幕等等
|
// 配置Player 音轨、字幕等等
|
||||||
_videoPlayerController = await _createVideoController(
|
_videoPlayerController = await _createVideoController(
|
||||||
dataSource, _looping, enableHA, width, height);
|
dataSource,
|
||||||
|
_looping,
|
||||||
|
enableHA,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
seekTo,
|
||||||
|
);
|
||||||
// 获取视频时长 00:00
|
// 获取视频时长 00:00
|
||||||
_duration.value = duration ?? _videoPlayerController!.state.duration;
|
_duration.value = duration ?? _videoPlayerController!.state.duration;
|
||||||
updateDurationSecond();
|
updateDurationSecond();
|
||||||
@ -404,7 +410,7 @@ class PlPlayerController {
|
|||||||
if (!_listenersInitialized) {
|
if (!_listenersInitialized) {
|
||||||
startListeners();
|
startListeners();
|
||||||
}
|
}
|
||||||
await _initializePlayer(seekTo: seekTo, duration: _duration.value);
|
await _initializePlayer(duration: _duration.value);
|
||||||
bool autoEnterFullcreen =
|
bool autoEnterFullcreen =
|
||||||
setting.get(SettingBoxKey.enableAutoEnter, defaultValue: false);
|
setting.get(SettingBoxKey.enableAutoEnter, defaultValue: false);
|
||||||
if (autoEnterFullcreen && _isFirstTime) {
|
if (autoEnterFullcreen && _isFirstTime) {
|
||||||
@ -424,6 +430,7 @@ class PlPlayerController {
|
|||||||
bool enableHA,
|
bool enableHA,
|
||||||
double? width,
|
double? width,
|
||||||
double? height,
|
double? height,
|
||||||
|
Duration? seekTo,
|
||||||
) async {
|
) async {
|
||||||
// 每次配置时先移除监听
|
// 每次配置时先移除监听
|
||||||
removeListeners();
|
removeListeners();
|
||||||
@ -506,7 +513,11 @@ class PlPlayerController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
player.open(
|
player.open(
|
||||||
Media(dataSource.videoSource!, httpHeaders: dataSource.httpHeaders),
|
Media(
|
||||||
|
dataSource.videoSource!,
|
||||||
|
httpHeaders: dataSource.httpHeaders,
|
||||||
|
start: seekTo ?? Duration.zero,
|
||||||
|
),
|
||||||
play: false,
|
play: false,
|
||||||
);
|
);
|
||||||
// 音轨
|
// 音轨
|
||||||
@ -519,7 +530,6 @@ class PlPlayerController {
|
|||||||
|
|
||||||
// 开始播放
|
// 开始播放
|
||||||
Future _initializePlayer({
|
Future _initializePlayer({
|
||||||
Duration seekTo = Duration.zero,
|
|
||||||
Duration? duration,
|
Duration? duration,
|
||||||
}) async {
|
}) async {
|
||||||
// 设置倍速
|
// 设置倍速
|
||||||
@ -537,11 +547,6 @@ class PlPlayerController {
|
|||||||
// await setLooping(_looping);
|
// await setLooping(_looping);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 跳转播放
|
|
||||||
if (seekTo != Duration.zero) {
|
|
||||||
await this.seekTo(seekTo);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 自动播放
|
// 自动播放
|
||||||
if (_autoPlay) {
|
if (_autoPlay) {
|
||||||
await play(duration: duration);
|
await play(duration: duration);
|
||||||
@ -661,21 +666,14 @@ class PlPlayerController {
|
|||||||
await _videoPlayerController?.stream.buffer.first;
|
await _videoPlayerController?.stream.buffer.first;
|
||||||
}
|
}
|
||||||
await _videoPlayerController?.seek(position);
|
await _videoPlayerController?.seek(position);
|
||||||
// if (playerStatus.stopped) {
|
|
||||||
// play();
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
print('seek duration else');
|
print('seek duration else');
|
||||||
_timerForSeek?.cancel();
|
_timerForSeek?.cancel();
|
||||||
_timerForSeek =
|
_timerForSeek =
|
||||||
Timer.periodic(const Duration(milliseconds: 200), (Timer t) async {
|
Timer.periodic(const Duration(milliseconds: 200), (Timer t) async {
|
||||||
//_timerForSeek = null;
|
|
||||||
if (duration.value.inSeconds != 0) {
|
if (duration.value.inSeconds != 0) {
|
||||||
await _videoPlayerController!.stream.buffer.first;
|
await _videoPlayerController!.stream.buffer.first;
|
||||||
await _videoPlayerController?.seek(position);
|
await _videoPlayerController?.seek(position);
|
||||||
// if (playerStatus.status.value == PlayerStatus.paused) {
|
|
||||||
// play();
|
|
||||||
// }
|
|
||||||
t.cancel();
|
t.cancel();
|
||||||
_timerForSeek = null;
|
_timerForSeek = null;
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,7 @@ class Em {
|
|||||||
return regCate(matchStr);
|
return regCate(matchStr);
|
||||||
}, onNonMatch: (String str) {
|
}, onNonMatch: (String str) {
|
||||||
if (str != '') {
|
if (str != '') {
|
||||||
str = str
|
str = decodeHtmlEntities(str);
|
||||||
.replaceAll('<', '<')
|
|
||||||
.replaceAll('>', '>')
|
|
||||||
.replaceAll('"', '"')
|
|
||||||
.replaceAll(''', "'")
|
|
||||||
.replaceAll('"', '"')
|
|
||||||
.replaceAll(''', "'")
|
|
||||||
.replaceAll(' ', " ")
|
|
||||||
.replaceAll('&', "&");
|
|
||||||
Map map = {'type': 'text', 'text': str};
|
Map map = {'type': 'text', 'text': str};
|
||||||
res.add(map);
|
res.add(map);
|
||||||
}
|
}
|
||||||
@ -35,4 +27,17 @@ class Em {
|
|||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static String decodeHtmlEntities(String title) {
|
||||||
|
return title
|
||||||
|
.replaceAll('<', '<')
|
||||||
|
.replaceAll('>', '>')
|
||||||
|
.replaceAll('"', '"')
|
||||||
|
.replaceAll(''', "'")
|
||||||
|
.replaceAll('"', '"')
|
||||||
|
.replaceAll(''', "'")
|
||||||
|
.replaceAll(' ', " ")
|
||||||
|
.replaceAll('&', "&")
|
||||||
|
.replaceAll(''', "'");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
35
pubspec.lock
35
pubspec.lock
@ -433,6 +433,14 @@ packages:
|
|||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.3"
|
version: "5.0.3"
|
||||||
|
expandable:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: expandable
|
||||||
|
sha256: "9604d612d4d1146dafa96c6d8eec9c2ff0994658d6d09fed720ab788c7f5afc2"
|
||||||
|
url: "https://pub.flutter-io.cn"
|
||||||
|
source: hosted
|
||||||
|
version: "5.0.1"
|
||||||
extended_image:
|
extended_image:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -857,10 +865,11 @@ packages:
|
|||||||
media_kit:
|
media_kit:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: media_kit
|
path: media_kit
|
||||||
sha256: "3289062540e3b8b9746e5c50d95bd78a9289826b7227e253dff806d002b9e67a"
|
ref: HEAD
|
||||||
url: "https://pub.flutter-io.cn"
|
resolved-ref: "77a130b1d7ce733b47d2133b57563716090450d0"
|
||||||
source: hosted
|
url: "https://github.com/media-kit/media-kit.git"
|
||||||
|
source: git
|
||||||
version: "1.1.10+1"
|
version: "1.1.10+1"
|
||||||
media_kit_libs_android_video:
|
media_kit_libs_android_video:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
@ -897,10 +906,11 @@ packages:
|
|||||||
media_kit_libs_video:
|
media_kit_libs_video:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: media_kit_libs_video
|
path: "libs/universal/media_kit_libs_video"
|
||||||
sha256: "3688e0c31482074578652bf038ce6301a5d21e1eda6b54fc3117ffeb4bdba067"
|
ref: HEAD
|
||||||
url: "https://pub.flutter-io.cn"
|
resolved-ref: "77a130b1d7ce733b47d2133b57563716090450d0"
|
||||||
source: hosted
|
url: "https://github.com/media-kit/media-kit.git"
|
||||||
|
source: git
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
media_kit_libs_windows_video:
|
media_kit_libs_windows_video:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
@ -921,10 +931,11 @@ packages:
|
|||||||
media_kit_video:
|
media_kit_video:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: media_kit_video
|
path: media_kit_video
|
||||||
sha256: c048d11a19e379aebbe810647636e3fc6d18374637e2ae12def4ff8a4b99a882
|
ref: HEAD
|
||||||
url: "https://pub.flutter-io.cn"
|
resolved-ref: "77a130b1d7ce733b47d2133b57563716090450d0"
|
||||||
source: hosted
|
url: "https://github.com/media-kit/media-kit.git"
|
||||||
|
source: git
|
||||||
version: "1.2.4"
|
version: "1.2.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
|
16
pubspec.yaml
16
pubspec.yaml
@ -142,6 +142,8 @@ dependencies:
|
|||||||
path: 1.8.3
|
path: 1.8.3
|
||||||
# 电池优化
|
# 电池优化
|
||||||
disable_battery_optimization: ^1.1.1
|
disable_battery_optimization: ^1.1.1
|
||||||
|
# 展开/收起
|
||||||
|
expandable: ^5.0.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@ -161,6 +163,20 @@ dev_dependencies:
|
|||||||
hive_generator: ^2.0.0
|
hive_generator: ^2.0.0
|
||||||
build_runner: ^2.4.8
|
build_runner: ^2.4.8
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
media_kit:
|
||||||
|
git:
|
||||||
|
url: https://github.com/media-kit/media-kit.git
|
||||||
|
path: media_kit
|
||||||
|
media_kit_video:
|
||||||
|
git:
|
||||||
|
url: https://github.com/media-kit/media-kit.git
|
||||||
|
path: media_kit_video
|
||||||
|
media_kit_libs_video:
|
||||||
|
git:
|
||||||
|
url: https://github.com/media-kit/media-kit.git
|
||||||
|
path: libs/universal/media_kit_libs_video
|
||||||
|
|
||||||
flutter_launcher_icons:
|
flutter_launcher_icons:
|
||||||
android: true
|
android: true
|
||||||
ios: true
|
ios: true
|
||||||
|
Reference in New Issue
Block a user