fix
This commit is contained in:
parent
14d6d92078
commit
04b3ca4f4d
9 changed files with 174 additions and 140 deletions
|
|
@ -1,6 +1,4 @@
|
|||
PODS:
|
||||
- auto_orientation (0.0.1):
|
||||
- Flutter
|
||||
- background_downloader (0.0.1):
|
||||
- Flutter
|
||||
- DKImagePickerController/Core (4.3.4):
|
||||
|
|
@ -45,8 +43,6 @@ PODS:
|
|||
- flutter_inappwebview/Core (0.0.1):
|
||||
- Flutter
|
||||
- OrderedSet (~> 5.0)
|
||||
- flutter_meedu_videoplayer (0.0.1):
|
||||
- Flutter
|
||||
- flutter_web_auth_2 (1.1.1):
|
||||
- Flutter
|
||||
- FMDB (2.7.5):
|
||||
|
|
@ -75,29 +71,22 @@ PODS:
|
|||
- SDWebImage/Core (5.17.0)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite (0.0.3):
|
||||
- Flutter
|
||||
- FMDB (>= 2.7.5)
|
||||
- SwiftyGif (5.4.4)
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
- video_player_avfoundation (0.0.1):
|
||||
- Flutter
|
||||
- volume_controller (0.0.1):
|
||||
- Flutter
|
||||
- wakelock_plus (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- auto_orientation (from `.symlinks/plugins/auto_orientation/ios`)
|
||||
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
|
||||
- flutter_meedu_videoplayer (from `.symlinks/plugins/flutter_meedu_videoplayer/ios`)
|
||||
- flutter_web_auth_2 (from `.symlinks/plugins/flutter_web_auth_2/ios`)
|
||||
- isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`)
|
||||
- media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`)
|
||||
|
|
@ -108,10 +97,8 @@ DEPENDENCIES:
|
|||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- screen_brightness_ios (from `.symlinks/plugins/screen_brightness_ios/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`)
|
||||
- volume_controller (from `.symlinks/plugins/volume_controller/ios`)
|
||||
- wakelock_plus (from `.symlinks/plugins/wakelock_plus/ios`)
|
||||
|
||||
|
|
@ -125,8 +112,6 @@ SPEC REPOS:
|
|||
- SwiftyGif
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
auto_orientation:
|
||||
:path: ".symlinks/plugins/auto_orientation/ios"
|
||||
background_downloader:
|
||||
:path: ".symlinks/plugins/background_downloader/ios"
|
||||
file_picker:
|
||||
|
|
@ -135,8 +120,6 @@ EXTERNAL SOURCES:
|
|||
:path: Flutter
|
||||
flutter_inappwebview:
|
||||
:path: ".symlinks/plugins/flutter_inappwebview/ios"
|
||||
flutter_meedu_videoplayer:
|
||||
:path: ".symlinks/plugins/flutter_meedu_videoplayer/ios"
|
||||
flutter_web_auth_2:
|
||||
:path: ".symlinks/plugins/flutter_web_auth_2/ios"
|
||||
isar_flutter_libs:
|
||||
|
|
@ -157,28 +140,22 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/screen_brightness_ios/ios"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_foundation:
|
||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||
sqflite:
|
||||
:path: ".symlinks/plugins/sqflite/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
video_player_avfoundation:
|
||||
:path: ".symlinks/plugins/video_player_avfoundation/ios"
|
||||
volume_controller:
|
||||
:path: ".symlinks/plugins/volume_controller/ios"
|
||||
wakelock_plus:
|
||||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
|
||||
background_downloader: 6f55e5548875be2ad4bb91b542558b5be22f339a
|
||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
|
||||
flutter_meedu_videoplayer: 5b898478d509443ff74817795882f5430e2b7001
|
||||
flutter_web_auth_2: a1bc00762c408a8f80b72a538cd7ff5b601c3e71
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
|
||||
|
|
@ -192,11 +169,9 @@ SPEC CHECKSUMS:
|
|||
screen_brightness_ios: 715ca807df953bf676d339f11464e438143ee625
|
||||
SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
|
||||
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
|
||||
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
||||
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
|
||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
||||
video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126
|
||||
volume_controller: 531ddf792994285c9b17f9d8a7e4dcdd29b3eae9
|
||||
wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@
|
|||
6BDC2D08725CFD30E791D1F9 /* Pods-RunnerTests.release.xcconfig */,
|
||||
1C61F57EF3EA8A85A2621879 /* Pods-RunnerTests.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
|
@ -215,7 +214,7 @@
|
|||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
|
|
@ -24,6 +26,12 @@
|
|||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
|
|
@ -43,9 +51,5 @@
|
|||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
|
@ -7,7 +8,9 @@ import 'package:flutter_riverpod/flutter_riverpod.dart' as riv;
|
|||
import 'package:mangayomi/models/chapter.dart';
|
||||
import 'package:mangayomi/models/video.dart' as vid;
|
||||
import 'package:mangayomi/modules/anime/providers/stream_controller_provider.dart';
|
||||
import 'package:mangayomi/modules/manga/reader/providers/push_router.dart';
|
||||
import 'package:mangayomi/modules/widgets/progress_center.dart';
|
||||
import 'package:mangayomi/providers/l10n_providers.dart';
|
||||
import 'package:mangayomi/services/get_anime_servers.dart';
|
||||
import 'package:mangayomi/utils/colors.dart';
|
||||
import 'package:mangayomi/utils/media_query.dart';
|
||||
|
|
@ -29,9 +32,27 @@ class AnimeStreamView extends riv.ConsumerStatefulWidget {
|
|||
|
||||
class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
void initState() {
|
||||
SystemChrome.setPreferredOrientations(
|
||||
[DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]);
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky,
|
||||
overlays: []);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.landscapeLeft,
|
||||
DeviceOrientation.landscapeRight,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final serversData = ref.watch(getAnimeServersProvider(
|
||||
chapter: widget.episode,
|
||||
));
|
||||
|
|
@ -106,7 +127,7 @@ class _AnimeStreamViewState extends riv.ConsumerState<AnimeStreamView> {
|
|||
Navigator.pop(context);
|
||||
return false;
|
||||
},
|
||||
child: ProgressCenter(),
|
||||
child: const ProgressCenter(),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
@ -132,13 +153,15 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
const VideoControllerConfiguration(enableHardwareAcceleration: true),
|
||||
);
|
||||
|
||||
late final streamController = AnimeStreamController(episode: widget.episode);
|
||||
late final _streamController = AnimeStreamController(episode: widget.episode);
|
||||
|
||||
final ValueNotifier<vid.Video?> _video = ValueNotifier(null);
|
||||
final ValueNotifier<double> _playbackSpeed = ValueNotifier(1.0);
|
||||
bool _seekToCurrentPosition = true;
|
||||
late Duration _currentPosition = streamController.geTCurrentPosition();
|
||||
late Duration _currentPosition = _streamController.geTCurrentPosition();
|
||||
bool _showFitLabel = false;
|
||||
final bool _isDesktop =
|
||||
Platform.isWindows || Platform.isMacOS || Platform.isLinux;
|
||||
late StreamSubscription<Duration> _currentPositionSub =
|
||||
_player.stream.position.listen(
|
||||
(Duration position) {
|
||||
|
|
@ -147,18 +170,18 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
_seekToCurrentPosition = false;
|
||||
} else {
|
||||
_currentPosition = position;
|
||||
streamController.setCurrentPosition(position.inMilliseconds);
|
||||
streamController.setAnimeHistoryUpdate();
|
||||
_streamController.setCurrentPosition(position.inMilliseconds);
|
||||
_streamController.setAnimeHistoryUpdate();
|
||||
}
|
||||
},
|
||||
);
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_currentPositionSub;
|
||||
_video.value = widget.videos[7];
|
||||
|
||||
_player.open(Media(widget.videos[0].originalUrl,
|
||||
httpHeaders: widget.videos[0].headers));
|
||||
_player.open(
|
||||
Media(_video.value!.originalUrl, httpHeaders: _video.value!.headers));
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -168,6 +191,66 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
void _onChangeVideoQuality() {
|
||||
final l10n = l10nLocalizations(context)!;
|
||||
showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (_) => CupertinoActionSheet(
|
||||
actions: List.generate(
|
||||
widget.videos.length,
|
||||
(index) {
|
||||
final quality = widget.videos[index];
|
||||
return CupertinoActionSheetAction(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
quality.quality,
|
||||
style: const TextStyle(),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 7,
|
||||
),
|
||||
Icon(
|
||||
Icons.check,
|
||||
color: _video.value == quality
|
||||
? Theme.of(context).iconTheme.color
|
||||
: Colors.transparent,
|
||||
),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
_video.value = quality; // change the video quality
|
||||
_player.open(
|
||||
Media(quality.originalUrl, httpHeaders: quality.headers));
|
||||
_seekToCurrentPosition = true;
|
||||
_currentPositionSub = _player.stream.position.listen(
|
||||
(Duration position) {
|
||||
if (_seekToCurrentPosition) {
|
||||
_player.seek(_currentPosition);
|
||||
_seekToCurrentPosition = false;
|
||||
} else {
|
||||
_currentPosition = position;
|
||||
_streamController
|
||||
.setCurrentPosition(position.inMilliseconds);
|
||||
_streamController.setAnimeHistoryUpdate();
|
||||
}
|
||||
},
|
||||
);
|
||||
Navigator.maybePop(_);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
cancelButton: CupertinoActionSheetAction(
|
||||
onPressed: () => Navigator.maybePop(_),
|
||||
isDestructiveAction: true,
|
||||
child: Text(l10n.cancel),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _setPlaybackSpeed(double speed) async {
|
||||
await _player.setRate(speed);
|
||||
_playbackSpeed.value = speed;
|
||||
|
|
@ -185,6 +268,9 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
}
|
||||
|
||||
List<Widget> _bottomButtonBar(BuildContext context) {
|
||||
bool hasPrevEpisode = _streamController.getEpisodeIndex() + 1 !=
|
||||
_streamController.getEpisodesLength();
|
||||
bool hasNextEpisode = _streamController.getEpisodeIndex() != 0;
|
||||
return [
|
||||
Flexible(
|
||||
child: Column(
|
||||
|
|
@ -199,61 +285,24 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: PopupMenuButton(
|
||||
child: const Icon(
|
||||
Icons.video_settings_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
),
|
||||
onSelected: (value) async {
|
||||
_video.value = value;
|
||||
await _player.open(Media(value.originalUrl,
|
||||
httpHeaders: value.headers));
|
||||
_seekToCurrentPosition = true;
|
||||
_currentPositionSub =
|
||||
_player.stream.position.listen(
|
||||
(Duration position) {
|
||||
if (_seekToCurrentPosition) {
|
||||
_player.seek(_currentPosition);
|
||||
_seekToCurrentPosition = false;
|
||||
} else {
|
||||
_currentPosition = position;
|
||||
streamController.setCurrentPosition(
|
||||
position.inMilliseconds);
|
||||
streamController.setAnimeHistoryUpdate();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
itemBuilder: (context) => [
|
||||
for (var quality in widget.videos)
|
||||
PopupMenuItem(
|
||||
height: 35,
|
||||
value: quality,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
quality.quality,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 7,
|
||||
),
|
||||
Icon(
|
||||
Icons.check,
|
||||
color: _video.value == quality
|
||||
? Colors.black
|
||||
: Colors.transparent,
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: CupertinoButton(
|
||||
padding: const EdgeInsets.all(5),
|
||||
onPressed: _onChangeVideoQuality,
|
||||
child: const Icon(
|
||||
Icons.video_settings_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
),
|
||||
)),
|
||||
if (_isDesktop)
|
||||
const MaterialDesktopVolumeButton(
|
||||
iconSize: 38,
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
|
|
@ -303,9 +352,7 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
});
|
||||
},
|
||||
),
|
||||
if (Platform.isWindows ||
|
||||
Platform.isMacOS ||
|
||||
Platform.isLinux)
|
||||
if (_isDesktop)
|
||||
const MaterialDesktopFullscreenButton()
|
||||
],
|
||||
),
|
||||
|
|
@ -316,12 +363,20 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
MaterialButton(
|
||||
child: const Icon(
|
||||
onPressed: hasPrevEpisode
|
||||
? () {
|
||||
pushReplacementMangaReaderView(
|
||||
context: context,
|
||||
chapter: _streamController.getPrevEpisode());
|
||||
}
|
||||
: null,
|
||||
child: Icon(
|
||||
Icons.skip_previous_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
color: hasPrevEpisode
|
||||
? Colors.white
|
||||
: Colors.white.withOpacity(0.4),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
|
|
@ -344,26 +399,39 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
const MaterialPlayOrPauseButton(
|
||||
iconSize: 36,
|
||||
),
|
||||
_isDesktop
|
||||
? const MaterialDesktopPlayOrPauseButton(
|
||||
iconSize: 36,
|
||||
)
|
||||
: const MaterialPlayOrPauseButton(
|
||||
iconSize: 36,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
MaterialButton(
|
||||
child: const Icon(
|
||||
onPressed: hasNextEpisode
|
||||
? () {
|
||||
pushReplacementMangaReaderView(
|
||||
context: context,
|
||||
chapter: _streamController.getNextEpisode(),
|
||||
);
|
||||
}
|
||||
: null,
|
||||
child: Icon(
|
||||
Icons.skip_next_outlined,
|
||||
size: 30,
|
||||
color: Colors.white,
|
||||
color: hasNextEpisode
|
||||
? Colors.white
|
||||
: Colors.white.withOpacity(0.4),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
|
@ -482,22 +550,24 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
normal: MaterialDesktopVideoControlsThemeData(
|
||||
visibleOnMount: true,
|
||||
buttonBarHeight: 83,
|
||||
seekBarContainerHeight: 3,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
seekBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
bottomButtonBar: _bottomButtonBar(context)),
|
||||
fullscreen: MaterialDesktopVideoControlsThemeData(
|
||||
buttonBarHeight: 83,
|
||||
seekBarContainerHeight: 3,
|
||||
controlsHoverDuration: const Duration(seconds: 5),
|
||||
seekBarPositionColor: primaryColor(context),
|
||||
seekBarThumbColor: primaryColor(context),
|
||||
primaryButtonBar: [],
|
||||
seekBarMargin: const EdgeInsets.only(bottom: 60, left: 8, right: 8),
|
||||
seekBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
topButtonBarMargin: const EdgeInsets.all(0),
|
||||
topButtonBar: _topButtonBar(context),
|
||||
bottomButtonBarMargin: const EdgeInsets.only(left: 8, right: 8),
|
||||
|
|
@ -515,7 +585,7 @@ class _AnimeStreamPageState extends State<AnimeStreamPage> {
|
|||
Navigator.pop(context);
|
||||
return false;
|
||||
},
|
||||
child: mobilePlayer(),
|
||||
child: _isDesktop ? desktopPlayer() : mobilePlayer(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,17 @@ class AnimeStreamController {
|
|||
return isar.settings.getSync(227)!;
|
||||
}
|
||||
|
||||
int getEpisodeIndex() {
|
||||
final chapters = getAnime().chapters.toList();
|
||||
int? index;
|
||||
for (var i = 0; i < chapters.length; i++) {
|
||||
if (chapters[i].id == episode.id) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
return index!;
|
||||
}
|
||||
|
||||
int getPrevEpisodeIndex() {
|
||||
final episodes = getAnime().chapters.toList();
|
||||
int? index;
|
||||
|
|
@ -53,7 +64,7 @@ class AnimeStreamController {
|
|||
return getAnime().chapters.toList()[getNextEpisodeIndex()];
|
||||
}
|
||||
|
||||
int getChaptersLength() {
|
||||
int getEpisodesLength() {
|
||||
return getAnime().chapters.length;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
PODS:
|
||||
- desktop_webview_window (0.0.1):
|
||||
- FlutterMacOS
|
||||
- flutter_meedu_videoplayer (0.0.1):
|
||||
- FlutterMacOS
|
||||
- flutter_web_auth_2 (1.1.1):
|
||||
- FlutterMacOS
|
||||
- FlutterMacOS (1.0.0)
|
||||
|
|
@ -24,13 +22,8 @@ PODS:
|
|||
- FlutterMacOS
|
||||
- screen_brightness_macos (0.1.0):
|
||||
- FlutterMacOS
|
||||
- screen_retriever (0.0.1):
|
||||
- FlutterMacOS
|
||||
- share_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- shared_preferences_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- sqflite (0.0.2):
|
||||
- FlutterMacOS
|
||||
- FMDB (>= 2.7.5)
|
||||
|
|
@ -38,14 +31,11 @@ PODS:
|
|||
- FlutterMacOS
|
||||
- wakelock_plus (0.0.1):
|
||||
- FlutterMacOS
|
||||
- window_manager (0.2.0):
|
||||
- FlutterMacOS
|
||||
- window_to_front (0.0.1):
|
||||
- FlutterMacOS
|
||||
|
||||
DEPENDENCIES:
|
||||
- desktop_webview_window (from `Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos`)
|
||||
- flutter_meedu_videoplayer (from `Flutter/ephemeral/.symlinks/plugins/flutter_meedu_videoplayer/macos`)
|
||||
- flutter_web_auth_2 (from `Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos`)
|
||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||
- isar_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/isar_flutter_libs/macos`)
|
||||
|
|
@ -55,13 +45,10 @@ DEPENDENCIES:
|
|||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- screen_brightness_macos (from `Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos`)
|
||||
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
|
||||
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`)
|
||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||
- wakelock_plus (from `Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos`)
|
||||
- window_manager (from `Flutter/ephemeral/.symlinks/plugins/window_manager/macos`)
|
||||
- window_to_front (from `Flutter/ephemeral/.symlinks/plugins/window_to_front/macos`)
|
||||
|
||||
SPEC REPOS:
|
||||
|
|
@ -71,8 +58,6 @@ SPEC REPOS:
|
|||
EXTERNAL SOURCES:
|
||||
desktop_webview_window:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/desktop_webview_window/macos
|
||||
flutter_meedu_videoplayer:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_meedu_videoplayer/macos
|
||||
flutter_web_auth_2:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_web_auth_2/macos
|
||||
FlutterMacOS:
|
||||
|
|
@ -91,26 +76,19 @@ EXTERNAL SOURCES:
|
|||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||
screen_brightness_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/screen_brightness_macos/macos
|
||||
screen_retriever:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
|
||||
share_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
||||
shared_preferences_foundation:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||
sqflite:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos
|
||||
url_launcher_macos:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||
wakelock_plus:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_plus/macos
|
||||
window_manager:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/window_manager/macos
|
||||
window_to_front:
|
||||
:path: Flutter/ephemeral/.symlinks/plugins/window_to_front/macos
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
desktop_webview_window: d4365e71bcd4e1aa0c14cf0377aa24db0c16a7e2
|
||||
flutter_meedu_videoplayer: fceb30a833044aaf6410c5da53c3d61ab3d6abbb
|
||||
flutter_web_auth_2: 6695649132b6c71ea17700703761c0d18fdb8cf6
|
||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||
|
|
@ -121,13 +99,10 @@ SPEC CHECKSUMS:
|
|||
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
||||
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||
screen_brightness_macos: 2d6d3af2165592d9a55ffcd95b7550970e41ebda
|
||||
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
|
||||
share_plus: 76dd39142738f7a68dd57b05093b5e8193f220f7
|
||||
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
||||
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
|
||||
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
|
||||
wakelock_plus: 4783562c9a43d209c458cb9b30692134af456269
|
||||
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
|
||||
window_to_front: 4cdc24ddd8461ad1a55fa06286d6a79d8b29e8d8
|
||||
|
||||
PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0920;
|
||||
LastUpgradeCheck = 1300;
|
||||
LastUpgradeCheck = 1430;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C80D4294CF70F00263BE5 = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
|
|
|||
Loading…
Reference in a new issue