Skip to content

Commit c9c5023

Browse files
committed
Connection fix
1 parent 87d889a commit c9c5023

4 files changed

Lines changed: 37 additions & 38 deletions

File tree

lib/models/app.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class AppModel extends ChangeNotifier {
158158
saveUUID(type.uuid);
159159
config = type.config;
160160
playersCacheSupport = type.playersCacheSupport;
161-
WsData.version = config?.cacheStorageLimitGiB == null ? 1 : 2;
161+
WsData.version = type.config.serverVersion;
162162
print('Server version: ${WsData.version}');
163163
_getTimeTimer?.cancel();
164164
_getTimeTimer = Timer.periodic(Duration(seconds: synchThreshold), (
@@ -325,6 +325,8 @@ class AppModel extends ChangeNotifier {
325325
player.seekTo(
326326
Duration(milliseconds: ms),
327327
);
328+
player.toggleControls(true);
329+
player.hideControlsWithDelay();
328330
break;
329331
case 'Play':
330332
chatPanel.serverPlay = true;

lib/wsdata.dart

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -289,14 +289,12 @@ class Config {
289289
late String channelName;
290290
late int maxLoginLength;
291291
late int maxMessageLength;
292-
late int serverChatHistory;
293292
late int totalVideoLimit;
294293
late int userVideoLimit;
295-
late bool localAdmins;
296294
late String templateUrl;
297295
late String youtubeApiKey;
298296
// in newer versions
299-
late double? cacheStorageLimitGiB;
297+
late int serverVersion;
300298
late Permissions? permissions;
301299
late List<Emotes> emotes;
302300
late List<Filters> filters;
@@ -308,13 +306,11 @@ class Config {
308306
required this.channelName,
309307
required this.maxLoginLength,
310308
required this.maxMessageLength,
311-
required this.serverChatHistory,
312309
required this.totalVideoLimit,
313310
required this.userVideoLimit,
314-
required this.localAdmins,
315311
required this.templateUrl,
316312
required this.youtubeApiKey,
317-
required this.cacheStorageLimitGiB,
313+
required this.serverVersion,
318314
required this.permissions,
319315
required this.emotes,
320316
required this.filters,
@@ -327,13 +323,16 @@ class Config {
327323
channelName = json['channelName'];
328324
maxLoginLength = json['maxLoginLength'];
329325
maxMessageLength = json['maxMessageLength'];
330-
serverChatHistory = json['serverChatHistory'];
331326
totalVideoLimit = json['totalVideoLimit'];
332327
userVideoLimit = json['userVideoLimit'];
333-
localAdmins = json['localAdmins'];
334328
templateUrl = json['templateUrl'];
335329
youtubeApiKey = json['youtubeApiKey'];
336-
cacheStorageLimitGiB = json['cacheStorageLimitGiB']?.toDouble();
330+
331+
int? version = json['serverVersion'];
332+
final cacheStorageLimitGiB = json['cacheStorageLimitGiB']?.toDouble();
333+
version ??= cacheStorageLimitGiB == null ? 1 : 2;
334+
serverVersion = version;
335+
337336
permissions = json['permissions'] != null
338337
? new Permissions.fromJson(json['permissions'])
339338
: null;
@@ -359,13 +358,11 @@ class Config {
359358
data['channelName'] = this.channelName;
360359
data['maxLoginLength'] = this.maxLoginLength;
361360
data['maxMessageLength'] = this.maxMessageLength;
362-
data['serverChatHistory'] = this.serverChatHistory;
363361
data['totalVideoLimit'] = this.totalVideoLimit;
364362
data['userVideoLimit'] = this.userVideoLimit;
365-
data['localAdmins'] = this.localAdmins;
366363
data['templateUrl'] = this.templateUrl;
367364
data['youtubeApiKey'] = this.youtubeApiKey;
368-
data['cacheStorageLimitGiB'] = this.cacheStorageLimitGiB;
365+
data['serverVersion'] = this.serverVersion;
369366
if (this.permissions != null) {
370367
data['permissions'] = this.permissions?.toJson();
371368
}

pubspec.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ packages:
9393
dependency: transitive
9494
description:
9595
name: cross_file
96-
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
96+
sha256: "942a4791cd385a68ccb3b32c71c427aba508a1bb949b86dff2adbe4049f16239"
9797
url: "https://pub.dev"
9898
source: hosted
99-
version: "0.3.4+2"
99+
version: "0.3.5"
100100
crypto:
101101
dependency: "direct main"
102102
description:
103103
name: crypto
104-
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
104+
sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf
105105
url: "https://pub.dev"
106106
source: hosted
107-
version: "3.0.6"
107+
version: "3.0.7"
108108
csslib:
109109
dependency: transitive
110110
description:
@@ -165,10 +165,10 @@ packages:
165165
dependency: "direct main"
166166
description:
167167
name: file_picker
168-
sha256: f2d9f173c2c14635cc0e9b14c143c49ef30b4934e8d1d274d6206fcb0086a06f
168+
sha256: f8f4ea435f791ab1f817b4e338ed958cb3d04ba43d6736ffc39958d950754967
169169
url: "https://pub.dev"
170170
source: hosted
171-
version: "10.3.3"
171+
version: "10.3.6"
172172
flutter:
173173
dependency: "direct main"
174174
description: flutter
@@ -220,10 +220,10 @@ packages:
220220
dependency: "direct main"
221221
description:
222222
name: http
223-
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
223+
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
224224
url: "https://pub.dev"
225225
source: hosted
226-
version: "1.5.0"
226+
version: "1.6.0"
227227
http_parser:
228228
dependency: transitive
229229
description:
@@ -292,10 +292,10 @@ packages:
292292
dependency: transitive
293293
description:
294294
name: meta
295-
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
295+
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
296296
url: "https://pub.dev"
297297
source: hosted
298-
version: "1.16.0"
298+
version: "1.17.0"
299299
native_device_orientation:
300300
dependency: "direct main"
301301
description:
@@ -521,10 +521,10 @@ packages:
521521
dependency: transitive
522522
description:
523523
name: test_api
524-
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
524+
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
525525
url: "https://pub.dev"
526526
source: hosted
527-
version: "0.7.6"
527+
version: "0.7.7"
528528
typed_data:
529529
dependency: transitive
530530
description:
@@ -617,10 +617,10 @@ packages:
617617
dependency: "direct main"
618618
description:
619619
name: video_player
620-
sha256: "0d55b1f1a31e5ad4c4967bfaa8ade0240b07d20ee4af1dfef5f531056512961a"
620+
sha256: "096bc28ce10d131be80dfb00c223024eb0fba301315a406728ab43dd99c45bdf"
621621
url: "https://pub.dev"
622622
source: hosted
623-
version: "2.10.0"
623+
version: "2.10.1"
624624
video_player_android:
625625
dependency: transitive
626626
description:
@@ -633,18 +633,18 @@ packages:
633633
dependency: transitive
634634
description:
635635
name: video_player_avfoundation
636-
sha256: "19ed1162a7a5520e7d7791e0b7b73ba03161b6a69428b82e4689e435b325432d"
636+
sha256: "03fc6d07dba2499588d30887329b399c1fe2d68ce4b7fcff0db79f44a2603f69"
637637
url: "https://pub.dev"
638638
source: hosted
639-
version: "2.8.5"
639+
version: "2.8.6"
640640
video_player_platform_interface:
641641
dependency: transitive
642642
description:
643643
name: video_player_platform_interface
644-
sha256: "9e372520573311055cb353b9a0da1c9d72b094b7ba01b8ecc66f28473553793b"
644+
sha256: "57c5d73173f76d801129d0531c2774052c5a7c11ccb962f1830630decd9f24ec"
645645
url: "https://pub.dev"
646646
source: hosted
647-
version: "6.5.0"
647+
version: "6.6.0"
648648
video_player_web:
649649
dependency: transitive
650650
description:
@@ -737,10 +737,10 @@ packages:
737737
dependency: "direct main"
738738
description:
739739
name: youtube_explode_dart
740-
sha256: "9ff345caf8351c59eb1b7560837f761e08d2beaea3b4187637942715a31a6f58"
740+
sha256: "947ba05e0c4f050743e480e7bca3575ff6427d86cc898c1a69f5e1d188cdc9e0"
741741
url: "https://pub.dev"
742742
source: hosted
743-
version: "2.5.2"
743+
version: "2.5.3"
744744
sdks:
745745
dart: ">=3.9.0 <4.0.0"
746746
flutter: ">=3.35.0"

pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1515
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1616
# Read more about iOS versioning at
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18-
version: 1.0.0+31
18+
version: 1.0.0+32
1919

2020
environment:
2121
sdk: ^3.9.0
@@ -32,15 +32,15 @@ dependencies:
3232

3333
shared_preferences: ^2.5.3
3434

35-
video_player: 2.10.0
35+
video_player: ^2.10.1
3636

3737
# perfect_volume_control: ^1.0.5
3838

3939
web_socket_channel: ^3.0.3
4040

41-
http: ^1.5.0
41+
http: ^1.6.0
4242

43-
youtube_explode_dart: ^2.5.2
43+
youtube_explode_dart: ^2.5.3
4444

4545
url_launcher: ^6.3.2
4646

@@ -56,7 +56,7 @@ dependencies:
5656

5757
ota_update: ^7.0.2
5858

59-
file_picker: ^10.3.3
59+
file_picker: ^10.3.6
6060

6161
# The following adds the Cupertino Icons font to your application.
6262
# Use with the CupertinoIcons class for iOS style icons.

0 commit comments

Comments
 (0)