Reproductor chewi integrado, wip tags, y diseño
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:nethive_neo/theme/theme.dart';
|
||||
import 'package:nethive_neo/helpers/globals.dart';
|
||||
import 'package:nethive_neo/widgets/premium_button.dart';
|
||||
import 'package:nethive_neo/pages/videos/widgets/premium_upload_dialog.dart';
|
||||
import 'package:nethive_neo/pages/videos/widgets/video_player_dialog.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
|
||||
class GestorVideosPage extends StatefulWidget {
|
||||
@@ -582,10 +583,31 @@ class _GestorVideosPageState extends State<GestorVideosPage> {
|
||||
}
|
||||
|
||||
void _playVideo(MediaFileModel video) {
|
||||
// TODO: Implementar reproductor de video
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Reproduciendo: ${video.title ?? video.fileName}'),
|
||||
// Verificar que el video tenga URL
|
||||
if (video.fileUrl == null || video.fileUrl!.isEmpty) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Error: El video no tiene URL válida'),
|
||||
backgroundColor: Color(0xFFFF2D2D),
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Abrir diálogo con reproductor
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (context) => VideoPlayerDialog(
|
||||
video: video,
|
||||
onPlaybackCompleted: () {
|
||||
// Incrementar reproducciones cuando termine el video
|
||||
final provider = Provider.of<VideosProvider>(context, listen: false);
|
||||
provider.incrementReproduccion(video.mediaFileId);
|
||||
},
|
||||
onClose: () {
|
||||
// Opcional: realizar alguna acción al cerrar
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user