Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.3" apply false
id("com.android.application") version "8.9.1" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}

Expand Down
6 changes: 3 additions & 3 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ class _AppState extends State<App> with WidgetsBindingObserver {
builder: (context, isChatVisible, child) {
return Selector<PlayerModel, double>(
selector: (context, player) {
final isInit =
player.controller?.value.isInitialized ?? false;
final isInit = player.isVideoLoaded();
if (!isInit) return 16 / 9;
return player.controller?.value.aspectRatio ?? 16 / 9;
return player.player?.aspectRatio ?? 16 / 9;
},
builder: (context, ratio, child) {
final media = MediaQuery.of(context);
Expand Down Expand Up @@ -378,6 +377,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
}
if (clipboardText.endsWith('.ts')) {
url = clipboardText.replaceAll('240.mp4', '1080.mp4');
url = clipboardText.replaceAll('360.mp4', '1080.mp4');
// `1080.mp4:hls:seg-123-v1-a1.ts` => `1080.mp4:hls:manifest.m3u8`
url = url.replaceAll(RegExp(r'seg-[^:]+\.ts$'), 'manifest.m3u8');
}
Expand Down
1 change: 1 addition & 0 deletions lib/models/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ class AppModel extends ChangeNotifier {
if (!data.item.url.startsWith('http')) {
data.item.url = 'http://${data.item.url}';
}
data.item.url = Uri.encodeFull(data.item.url);
final url = data.item.url;
if (url.contains('youtube.com/playlist')) {
sendYoutubePlaylist(data);
Expand Down
Loading