Skip to content

Commit cf45444

Browse files
committed
fix ci build for android
remove fijkplayer
1 parent 89ab092 commit cf45444

File tree

10 files changed

+16
-126
lines changed

10 files changed

+16
-126
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ jobs:
132132
cat>appdmg.json<<EOF
133133
{
134134
"title": "红枫云盘",
135-
"icon": "Maple File.app/Contents/Resources/AppIcon.icns",
135+
"icon": "MapleFile.app/Contents/Resources/AppIcon.icns",
136136
"background-color": "#ffffff",
137137
"contents": [
138138
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
139-
{ "x": 192, "y": 344, "type": "file", "path": "Maple File.app" }
139+
{ "x": 192, "y": 344, "type": "file", "path": "MapleFile.app" }
140140
]
141141
}
142142
EOF

app/android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "8.1.0" apply false
21+
id "com.android.application" version "8.2.1" apply false
2222
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
2323
}
2424

app/ios/Podfile.lock

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
PODS:
22
- audioplayers_darwin (0.0.1):
33
- Flutter
4-
- BIJKPlayer (0.7.16)
54
- DKImagePickerController/Core (4.3.9):
65
- DKImagePickerController/ImageDataManager
76
- DKImagePickerController/Resource
@@ -35,9 +34,6 @@ PODS:
3534
- SwiftyGif
3635
- external_path (2.0.1):
3736
- Flutter
38-
- fijkplayer (0.11.0):
39-
- BIJKPlayer (~> 0.7.16)
40-
- Flutter
4137
- file_picker (0.0.1):
4238
- DKImagePickerController/PhotoGallery
4339
- Flutter
@@ -73,7 +69,6 @@ PODS:
7369
DEPENDENCIES:
7470
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
7571
- external_path (from `.symlinks/plugins/external_path/ios`)
76-
- fijkplayer (from `.symlinks/plugins/fijkplayer/ios`)
7772
- file_picker (from `.symlinks/plugins/file_picker/ios`)
7873
- Flutter (from `Flutter`)
7974
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
@@ -88,7 +83,6 @@ DEPENDENCIES:
8883

8984
SPEC REPOS:
9085
trunk:
91-
- BIJKPlayer
9286
- DKImagePickerController
9387
- DKPhotoGallery
9488
- mdk
@@ -100,8 +94,6 @@ EXTERNAL SOURCES:
10094
:path: ".symlinks/plugins/audioplayers_darwin/ios"
10195
external_path:
10296
:path: ".symlinks/plugins/external_path/ios"
103-
fijkplayer:
104-
:path: ".symlinks/plugins/fijkplayer/ios"
10597
file_picker:
10698
:path: ".symlinks/plugins/file_picker/ios"
10799
Flutter:
@@ -127,11 +119,9 @@ EXTERNAL SOURCES:
127119

128120
SPEC CHECKSUMS:
129121
audioplayers_darwin: ccf9c770ee768abb07e26d90af093f7bab1c12ab
130-
BIJKPlayer: 4c5d66e5cb99ae5bade6f22a4fcc031722a81c64
131122
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
132123
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
133124
external_path: fd37c654b69a1336e33a2403f48383ae6100e443
134-
fijkplayer: 2dd31ec312ba554bb6a9163cb2f44cdb528e50da
135125
file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
136126
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
137127
flutter_native_splash: 6cad9122ea0fad137d23137dd14b937f3e90b145

app/lib/api/file/widgets/preview/video.dart

Lines changed: 4 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,22 @@
11
import 'dart:io';
22
import 'package:flutter/material.dart';
3-
import 'package:fijkplayer/fijkplayer.dart';
43

54
import 'package:chewie/chewie.dart';
65
import 'package:video_player/video_player.dart';
76

87
import 'package:maple_file/app/i18n.dart';
9-
import 'package:maple_file/common/utils/util.dart';
108

119
import 'source.dart';
1210

13-
abstract class VideoPreviewController extends PreviewSourceListController {
14-
PreviewSourceImpl? get source;
15-
16-
Future<void> play();
17-
Future<void> pause();
18-
Future<void> resume();
19-
// Future<void> setSource(PreviewSourceImpl s, {bool autoPlay = false});
20-
21-
Widget playerWidget(BuildContext context);
22-
}
23-
24-
class MobileVideoPreviewController extends VideoPreviewController {
25-
final FijkPlayer _player;
26-
27-
PreviewSourceImpl? _source;
28-
29-
MobileVideoPreviewController({
30-
PreviewSourceImpl? source,
31-
bool autoPlay = false,
32-
}) : _source = source,
33-
_player = FijkPlayer() {
34-
if (source != null) {
35-
setSource(source, autoPlay: autoPlay);
36-
}
37-
}
38-
39-
FijkPlayer get player => _player;
40-
41-
@override
42-
PreviewSourceImpl? get source => _source;
43-
44-
@override
45-
Future<void> play() {
46-
return _player.start();
47-
}
48-
49-
@override
50-
Future<void> pause() async {
51-
await _player.pause();
52-
}
53-
54-
@override
55-
Future<void> resume() async {
56-
await _player.start();
57-
}
58-
59-
@override
60-
Future<void> setSource(PreviewSourceImpl s, {bool autoPlay = false}) async {
61-
_source = s;
62-
63-
await player.reset();
64-
65-
switch (s.type) {
66-
case SourceType.file:
67-
return _player.setDataSource("file://${s.path}", autoPlay: autoPlay);
68-
case SourceType.asset:
69-
return _player.setDataSource("asset:///${s.path}", autoPlay: autoPlay);
70-
case SourceType.network:
71-
return _player.setDataSource(s.path, autoPlay: autoPlay);
72-
}
73-
}
74-
75-
@override
76-
void dispose() {
77-
_player.release();
78-
// _player.dispose();
79-
super.dispose();
80-
}
81-
82-
@override
83-
Widget playerWidget(BuildContext context) {
84-
return FijkView(
85-
fit: FijkFit.cover,
86-
player: _player,
87-
);
88-
}
89-
}
90-
91-
class DesktopVideoPreviewController extends VideoPreviewController {
11+
class VideoPreviewController extends PreviewSourceListController {
9212
late VideoPlayerController _controller;
9313

9414
ChewieController? _chewieController;
9515
PreviewSourceImpl? _source;
9616

9717
bool _initialized = false;
9818

99-
DesktopVideoPreviewController({
19+
VideoPreviewController({
10020
PreviewSourceImpl? source,
10121
bool autoPlay = false,
10222
}) : _source = source {
@@ -118,20 +38,16 @@ class DesktopVideoPreviewController extends VideoPreviewController {
11838

11939
VideoPlayerController get player => _controller;
12040

121-
@override
12241
PreviewSourceImpl? get source => _source;
12342

124-
@override
12543
Future<void> play() async {
12644
return _controller.play();
12745
}
12846

129-
@override
13047
Future<void> pause() {
13148
return _controller.pause();
13249
}
13350

134-
@override
13551
Future<void> resume() {
13652
return _controller.play();
13753
}
@@ -178,7 +94,6 @@ class DesktopVideoPreviewController extends VideoPreviewController {
17894
super.dispose();
17995
}
18096

181-
@override
18297
Widget playerWidget(BuildContext context) {
18398
return Chewie(
18499
controller: chewie,
@@ -209,10 +124,7 @@ class _VideoPreviewState extends State<VideoPreview> {
209124
void initState() {
210125
super.initState();
211126

212-
_controller = widget.controller ??
213-
(Util.isDesktop
214-
? DesktopVideoPreviewController()
215-
: MobileVideoPreviewController());
127+
_controller = widget.controller ?? VideoPreviewController();
216128
_controller.setSource(widget.source, autoPlay: widget.autoPlay);
217129

218130
_controller.addListener(() {
@@ -268,10 +180,7 @@ class _VideoListPreviewState extends State<VideoListPreview> {
268180

269181
_index = widget.index;
270182

271-
_controller = widget.controller ??
272-
(Util.isDesktop
273-
? DesktopVideoPreviewController()
274-
: MobileVideoPreviewController());
183+
_controller = widget.controller ?? VideoPreviewController();
275184
}
276185

277186
@override

app/lib/app/app.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class App {
8888
}
8989

9090
Future<void> initMedia() async {
91-
if (Util.isDesktop) {
92-
fvp.registerWith();
93-
}
91+
fvp.registerWith(options: {
92+
"global": {"log": "off"}
93+
});
9494
}
9595

9696
Future<void> initPermission() async {}

app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18-
BuildableName = "Maple File.app"
18+
BuildableName = "MapleFile.app"
1919
BlueprintName = "Runner"
2020
ReferencedContainer = "container:Runner.xcodeproj">
2121
</BuildableReference>
@@ -31,7 +31,7 @@
3131
<BuildableReference
3232
BuildableIdentifier = "primary"
3333
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
34-
BuildableName = "Maple File.app"
34+
BuildableName = "MapleFile.app"
3535
BlueprintName = "Runner"
3636
ReferencedContainer = "container:Runner.xcodeproj">
3737
</BuildableReference>
@@ -66,7 +66,7 @@
6666
<BuildableReference
6767
BuildableIdentifier = "primary"
6868
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
69-
BuildableName = "Maple File.app"
69+
BuildableName = "MapleFile.app"
7070
BlueprintName = "Runner"
7171
ReferencedContainer = "container:Runner.xcodeproj">
7272
</BuildableReference>
@@ -83,7 +83,7 @@
8383
<BuildableReference
8484
BuildableIdentifier = "primary"
8585
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
86-
BuildableName = "Maple File.app"
86+
BuildableName = "MapleFile.app"
8787
BlueprintName = "Runner"
8888
ReferencedContainer = "container:Runner.xcodeproj">
8989
</BuildableReference>

app/macos/Runner/Configs/AppInfo.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// 'flutter create' template.
66

77
// The application's name. By default this is also the title of the Flutter window.
8-
PRODUCT_NAME = maple_file
8+
PRODUCT_NAME = MapleFile
99

1010
// The application's bundle identifier
1111
PRODUCT_BUNDLE_IDENTIFIER = com.honmaple.mapleFile

app/macos/Runner/en.lproj/InfoPlist.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
*/
88

9-
"CFBundleDisplayName" = "Maple File";
9+
"CFBundleDisplayName" = "MapleFile";

app/pubspec.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,6 @@ packages:
374374
url: "https://pub.flutter-io.cn"
375375
source: hosted
376376
version: "15.0.0"
377-
fijkplayer:
378-
dependency: "direct main"
379-
description:
380-
name: fijkplayer
381-
sha256: e6098034e696ce448f5f289fb5b3fa363df5e606bdb418d52944c1dcb8e14cba
382-
url: "https://pub.flutter-io.cn"
383-
source: hosted
384-
version: "0.11.0"
385377
file:
386378
dependency: transitive
387379
description:

app/pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ dependencies:
5555
chewie: ^1.10.0
5656
video_player: ^2.9.1
5757
video_player_platform_interface: ^6.2.2
58-
fijkplayer: ^0.11.0
5958
audioplayers: ^6.1.0
6059
file_picker: ^8.1.2
6160
external_path: ^2.0.1

0 commit comments

Comments
 (0)