1 Commits

Author SHA1 Message Date
102e3c677c Обновил README.md 2026-03-05 15:07:16 +05:00
3 changed files with 16 additions and 25 deletions

View File

@@ -1,3 +1,18 @@
# music-storage
Мини сервис для хранения/загрузки/воспроизведении песен
Мини сервис для хранения/загрузки/воспроизведении песен
Пример сервиса: https://music.nervy.pro
## environment
- переименовать `music_storage/.env.example` -> `music_storage/.env`
- заполнить `.env`
## Запуск
```bash
cd music_storage
uv run python manage.py runserver
```

View File

@@ -8,9 +8,6 @@ document.addEventListener('DOMContentLoaded', function () {
const playPauseBtn = document.getElementById('playPauseBtn');
const nextBtn = document.getElementById('nextBtn');
const prevBtn = document.getElementById('prevBtn');
const volumeControl = document.getElementById('volumeControl');
const savedVolume = localStorage.getItem('audioPlayerVolume');
const progressBar = document.getElementById('audioProgress');
const currentTimeElem = document.getElementById('currentTime');
@@ -37,17 +34,6 @@ document.addEventListener('DOMContentLoaded', function () {
if (currentTimeElem) currentTimeElem.textContent = formatTime(current || 0);
if (durationElem) durationElem.textContent = formatTime(duration || 0);
}
// Восстановление сохраненного уровня громкости
if (savedVolume !== null) {
audioPlayer.volume = parseFloat(savedVolume);
}
// Управление громкостью
if (volumeControl) {
volumeControl.addEventListener('input', () => {
audioPlayer.volume = volumeControl.value;
});
}
// Обновление прогресса при воспроизведении
audioPlayer.addEventListener('timeupdate', () => {

View File

@@ -15,16 +15,6 @@
<button class="control-btn" id="prevBtn"><i class="fas fa-backward"></i></button>
<button class="control-btn" id="playPauseBtn"><i class="fas fa-play"></i></button>
<button class="control-btn" id="nextBtn"><i class="fas fa-forward"></i></button>
<input
type="range"
id="volumeControl"
min="0"
max="1"
step="0.01"
value="1"
title="Громкость"
>
</div>
</div>
<audio id="audioPlayer" class="audio-player" preload="metadata">