mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-23 15:08:07 +02:00
feat: Add a themed loading screen widget and a web-based HLS/MPEG-TS video player.
This commit is contained in:
1 parent
be51118dc2
commit
79ad1243fa
2 files changed
+42
-10
No files matched your search
@@ -7,20 +7,33 @@ class ThemedLoading extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
gradient: RadialGradient(
|
gradient: LinearGradient(
|
||||||
center: Alignment(0, -0.2),
|
begin: Alignment.topLeft,
|
||||||
radius: 1.5,
|
end: Alignment.bottomRight,
|
||||||
colors: [
|
colors: [
|
||||||
Color(0xFF2C2C2E),
|
Color(0xFF0F1014), // Deep Space Dark
|
||||||
Color(0xFF000000),
|
Color(0xFF181920), // Soft Eerie Black
|
||||||
],
|
],
|
||||||
stops: [0.0, 1.0],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: const Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator(
|
child: Column(
|
||||||
color: Colors.white,
|
mainAxisSize: MainAxisSize.min,
|
||||||
strokeWidth: 3,
|
children: [
|
||||||
|
const CircularProgressIndicator(
|
||||||
|
color: Color(0xFF007AFF), // Electric Blue (AppColors.primary)
|
||||||
|
strokeWidth: 3,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
Text(
|
||||||
|
'Loading...',
|
||||||
|
style: TextStyle(
|
||||||
|
fontFamily: 'Outfit', // Match AppTheme
|
||||||
|
color: Colors.white.withOpacity(0.7),
|
||||||
|
fontSize: 14,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -471,6 +471,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Listen for messages from Flutter
|
||||||
|
window.addEventListener('message', (event) => {
|
||||||
|
const data = event.data;
|
||||||
|
if (!data) return;
|
||||||
|
|
||||||
|
if (data.type === 'play') {
|
||||||
|
video.play().catch(e => log('Play command failed: ' + e));
|
||||||
|
} else if (data.type === 'pause') {
|
||||||
|
video.pause();
|
||||||
|
} else if (data.type === 'set_volume') {
|
||||||
|
video.volume = Math.max(0, Math.min(1, parseFloat(data.value)));
|
||||||
|
video.muted = video.volume === 0;
|
||||||
|
} else if (data.type === 'seek') {
|
||||||
|
if (isFinite(video.duration)) {
|
||||||
|
video.currentTime = parseFloat(data.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Start player
|
// Start player
|
||||||
initPlayer();
|
initPlayer();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in new issue
Block a user