mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
Feature: Visual Snackbar for resume playback feedback
This commit is contained in:
1 parent
3aea298b26
commit
326af09282
1 file changed
+11
@@ -300,6 +300,17 @@ class _NativePlayerScreenState extends ConsumerState<NativePlayerScreen> {
|
|||||||
if (_isPlaying && _duration.inSeconds > 0) {
|
if (_isPlaying && _duration.inSeconds > 0) {
|
||||||
debugPrint('MediaKitPlayer: Seeking to resume position ${positionSeconds}s (attempt $attempt)');
|
debugPrint('MediaKitPlayer: Seeking to resume position ${positionSeconds}s (attempt $attempt)');
|
||||||
_player.seek(Duration(seconds: positionSeconds));
|
_player.seek(Duration(seconds: positionSeconds));
|
||||||
|
|
||||||
|
// Show visual notification
|
||||||
|
final minutes = positionSeconds ~/ 60;
|
||||||
|
final seconds = positionSeconds % 60;
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Reprise à ${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}'),
|
||||||
|
duration: const Duration(seconds: 2),
|
||||||
|
backgroundColor: Colors.green.shade700,
|
||||||
|
),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
debugPrint('MediaKitPlayer: Player not ready, retrying resume seek (attempt $attempt)');
|
debugPrint('MediaKitPlayer: Player not ready, retrying resume seek (attempt $attempt)');
|
||||||
_seekToResume(positionSeconds, attempt + 1);
|
_seekToResume(positionSeconds, attempt + 1);
|
||||||
|
|||||||
Reference in new issue
Block a user