Files
videoPlayer/README-WINDOWS.md
2025-10-02 01:52:03 -06:00

163 lines
3.9 KiB
Markdown

# Quantum Player - Scripts de Windows
## 🚀 Scripts Disponibles
### **quantum-start.bat**
Inicia el servidor Quantum Player desde cualquier ubicación en Windows.
```bash
# Doble click en el archivo o ejecutar desde CMD/PowerShell
quantum-start.bat
```
### **quantum-stop.bat**
Detiene el servidor Quantum Player.
```bash
quantum-stop.bat
```
### **install-autostart.bat**
Instala el inicio automático de Quantum Player al encender Windows.
```bash
# Ejecutar como administrador (click derecho -> Ejecutar como administrador)
install-autostart.bat
```
Esto copiará `quantum-autostart.bat` a la carpeta de Inicio de Windows.
### **uninstall-autostart.bat**
Desinstala el inicio automático.
```bash
uninstall-autostart.bat
```
---
## ⚙️ Panel de Configuración Web
### Acceder al Panel
1. Abre el navegador en https://video.nucleoriofrio.com
2. Haz click en el botón ⚙️ en el header (esquina superior derecha)
3. Ingresa la contraseña: **431522**
### Opciones Disponibles
- **Toggle de Autostart**: Habilita/deshabilita el inicio automático
- Visualiza el estado actual del autostart
- Instrucciones de instalación
---
## 📁 Estructura de Archivos
```
videoPlayer/
├── quantum-start.bat # Inicia el servidor
├── quantum-stop.bat # Detiene el servidor
├── quantum-autostart.bat # Script de autostart (usado por Windows)
├── install-autostart.bat # Instala autostart
├── uninstall-autostart.bat # Desinstala autostart
├── autostart.sh # Script bash para autostart
├── .autostart-config # Configuración (enabled/disabled)
└── videos/ # Carpeta con los videos
```
---
## 🔧 Cómo Funciona el Autostart
1. **Instalación Manual (Recomendado)**:
- Ejecuta `install-autostart.bat` como administrador
- Esto copia el script a `%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup`
- El servidor se iniciará automáticamente al encender Windows
2. **Control desde la Web**:
- El toggle en el panel web controla el archivo `.autostart-config`
- Valores: `enabled` o `disabled`
- Cuando está `disabled`, el script detecta esto y no inicia el servidor
- Cuando está `enabled`, el servidor inicia normalmente
3. **Desinstalación**:
- Ejecuta `uninstall-autostart.bat` para remover de Startup
- O elimina manualmente el archivo desde:
- `C:\Users\TU_USUARIO\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\quantum-autostart.bat`
---
## 🎯 Casos de Uso
### Inicio Manual
```bash
# Desde Windows Explorer
Doble click en quantum-start.bat
# Desde PowerShell/CMD
cd C:\path\to\videoPlayer
.\quantum-start.bat
```
### Inicio Automático
```bash
# 1. Instalar (solo una vez)
install-autostart.bat
# 2. Reiniciar Windows
# El servidor se iniciará automáticamente
# 3. Para deshabilitar temporalmente:
# Ir al panel web -> ⚙️ -> Ingresar contraseña -> Toggle OFF
```
### Detener el Servidor
```bash
quantum-stop.bat
```
---
## 🔐 Seguridad
- **Contraseña del Panel**: 431522
- **Cambiar Contraseña**:
- Editar `/server/api/config.post.ts`
- Buscar `const CORRECT_PASSWORD = '431522'`
- Cambiar por tu contraseña
- Ejecutar `npm run build`
---
## 🐛 Troubleshooting
### El servidor no inicia
```bash
# Verificar si WSL está corriendo
wsl --list --running
# Verificar logs
wsl -d Ubuntu -e bash -c "cat /tmp/video-player.log"
```
### Autostart no funciona
```bash
# Verificar que el archivo existe en Startup
dir "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
# Verificar configuración
wsl -d Ubuntu -e bash -c "cat /home/draganel/repos/videoPlayer/.autostart-config"
```
### Puerto 3000 ya en uso
```bash
# Detener todos los procesos
quantum-stop.bat
# Reiniciar
quantum-start.bat
```
---
## 📞 Soporte
Para más información:
- URL Pública: https://video.nucleoriofrio.com
- URL Local: http://localhost:3000
- Logs: `/tmp/video-player.log` (en WSL)