Fratch TV is a simple Node.js application that serves a web page for playing videos in random order. It utilizes Docker to containerize the application.
These instructions will help you set up and run the Fratch TV application.
- Node.js 18+ (for local development without Docker)
- Docker (optional, only if you want to run via container)
docker build -t fratch-tv .docker run -p 1997:1997 fratch-tvnpm install
npm startOpen http://localhost:1997 in your browser.
Access the Fratch TV application by opening http://localhost:1997 in your web browser. The application allows you to play random videos with basic controls.
- Dockerfile: Specifies the Docker image for the Node.js application.
- index.js: Node.js server code that handles video playback and server configuration.
- public/index.html: HTML file for the web page served by the Node.js server.
- public/scripts/playVideos.js: JavaScript file containing the logic for playing videos randomly.
- videos/: Directory to store video files. Additional Information The application uses Video.js for video playback.
FratchTV can load videos based on the current date/time. Create folders inside videos/ using these rules:
videos/<namedDateInterval>/<namedTimeInterval>/(highest priority)videos/<namedDateInterval>/videos/<namedTimeInterval>/videos/default/(fallback)
Intervals are configured in config.json. For example, during natale + sera, videos inside
videos/natale/sera are added first, then videos/natale, then videos/sera, then videos/default.
Video files should have extensions like .mp4, .avi, .mkv, or .webm.
This project is licensed under the MIT License - see the LICENSE.md file for details.