Custom Audio Player and Judging Script for Rap Battles on lotusbattle.ru
lotusbattle.ru
For the rap battle platform lotusbattle.ru, I created a custom audio player for convenient track listening and a Google Sheets integration script to facilitate battle judging.
Brief Description
This project represented a comprehensive solution for automating processes on the rap battle platform. It included developing a modern web audio player with MP3 file support and a visual indicator system for synchronizing judging data with Google Sheets.
Audio Player Functionality
Core Features
- Howler.js Web Audio Player - Using Howler.js v2.2.3 library for reliable sound control
- Intuitive Interface - Play/pause buttons, volume control with Font Awesome icons
- Interactive Controls - Volume slider and progress bar with seek functionality
- Information Display - Track name and time display (current/total) in MM:SS format
Design and UX
- Fixed Positioning - Player anchored at the bottom of the screen for easy access
- Corporate Dark Theme - Using colors #17243C (background) and #2C7658 (active elements)
- Responsive Design - Flexbox layout with 61% width and 360px left margin
- Custom Control Elements - Styled sliders for WebKit and Mozilla browsers
Playback Automation
- Smart Link Detection - Automatic search and processing of MP3 links from selstorage.ru domain
- Visual Feedback - Highlighting active link with SeaGreen color
- State Management - Automatic pause of current track when selecting a new one
Google Sheets Integration
Data Parsing and Processing
- CSV Parsing - Using PapaParse library to load data from Google Sheets
- Name Formatting - Extracting and cleaning participant names from numbers and extra spaces
- Data Comparison - Matching information from Google Sheets with HTML form data
Visual Indicator System
- Color Indication - Red dots for mismatched data, green for matched data
- Precise Positioning - Absolute positioning of indicators in the top-right corner of elements
- Numbering System - Using data-number attribute to link elements with data
- Reverse Search - Element search algorithm in reverse order to prevent duplication
Technical Features
Architecture and Performance
- Rendering Optimization - Using requestAnimationFrame for smooth playback progress updates
- DOM Event Handling - Dynamic interaction with page elements through event listeners
- State Management - Proper handling of track completion events and state reset
Cross-Browser Compatibility
- Control Element Styling - Custom styles for WebKit (-webkit-appearance) and Mozilla (-moz-appearance)
- Modern Web Standards - Using modern CSS properties and JavaScript APIs
- Supported Libraries - Font Awesome v5.15.3 for icons with broad browser support
Work Stages
- Requirements Analysis - Studying rap battle platform specifics and automation needs
- Architecture Design - Planning audio player structure and Google Sheets integration
- Audio Player Development - Creating interface and playback logic using Howler.js
- Google Sheets Integration - Developing data parsing system and visual indicators
- Testing and Debugging - Verifying all components work in various usage scenarios
- Deployment and Optimization - Solution deployment and performance tuning
Final Result
- Functional Audio Player - Modern interface with complete set of playback control functions
- Judging Automation - Visual indicator system for tracking battle participant status
- Real-time Integration - Google Sheets data synchronization with web interface
- Enhanced UX - Significant simplification of processes for battle organizers and judges
Technologies Used
- Howler.js v2.2.3 - Audio control library
- Font Awesome v5.15.3 - Interface icons
- PapaParse - CSV data parsing from Google Sheets
- HTML5/CSS3 - Modern markup and styling
- JavaScript (ES6+) - Application logic and DOM manipulation
- Google Sheets API - Integration with spreadsheets for judging data
- Flexbox - Responsive interface layout