Compare commits
5 Commits
cleanup-ch
...
v0.1.2-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a839de999 | ||
|
|
bbf4d88f61 | ||
|
|
ffc8f2a558 | ||
|
|
5223c9697f | ||
|
|
fdc96965f3 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
.old/
|
||||
.cursor/
|
||||
tag-release.sh
|
||||
20
README.md
Normal file
20
README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Cassette Player
|
||||
|
||||
Simple HTML/JS/CSS Cassette Player
|
||||
|
||||
## Instructions for hosting
|
||||
|
||||
1. Clone or download this repository.
|
||||
- if downloading as a zip file, extract to a temporary folder
|
||||
2. Copy or move the relevant files to the location you want to host them from. **Keep all files together in the same location/folder**.
|
||||
- `index.html` - main HTML file
|
||||
- `app.js` - main app JavaScript file
|
||||
- `styles.css` - app styling CSS file
|
||||
- `background.png` - image for player background
|
||||
3. Navigate to `http://<yourhost.com>/path/to/where/you/saved/index.html` in your browser.
|
||||
|
||||
### Alternatively, if just previewing
|
||||
|
||||
1. Unzip to a temporary folder.
|
||||
2. Open `index.html` in your browser. (`ctrl/cmd+o`, drag and drop, etc.)
|
||||
a. or navigate to the file manually in your address bar (e.g. `file:///Users/username/tempfolder/cassette-player/index.html`)
|
||||
51
app.js
51
app.js
@@ -1,3 +1,4 @@
|
||||
const APP_VERSION = '0.1.2-beta';
|
||||
const playlist = [
|
||||
{ url: 'https://feed.falsefinish.club/Echo%20Reality/PINK%20FLIGHT/MP3%20BOUNCE/01.%20PINK%20FLIGHT%20ATTENDANT.mp3', name: 'TRACK 1 - PINK FLIGHT ATTENDANT' },
|
||||
{ url: 'https://feed.falsefinish.club/Echo%20Reality/PINK%20FLIGHT/MP3%20BOUNCE/02.%20NOW.mp3', name: 'TRACK 2 - NOW' },
|
||||
@@ -1145,6 +1146,13 @@ audio.addEventListener('timeupdate', () => {
|
||||
updateTapeSizes();
|
||||
});
|
||||
|
||||
// Update time display when metadata loads (fixes cold start 0:00 / 0:00 issue)
|
||||
audio.addEventListener('loadedmetadata', () => {
|
||||
const current = formatTime(audio.currentTime);
|
||||
const duration = formatTime(audio.duration);
|
||||
timeDisplay.textContent = `${current} / ${duration}`;
|
||||
});
|
||||
|
||||
// Format time helper
|
||||
function formatTime(seconds) {
|
||||
if (isNaN(seconds)) return '00:00';
|
||||
@@ -1182,6 +1190,8 @@ document.addEventListener('keydown', (e) => {
|
||||
closeVideo.click();
|
||||
} else if (albyPanel.classList.contains('active')) {
|
||||
toggleAlbyPanel();
|
||||
} else if (versionModal && versionModal.classList.contains('active')) {
|
||||
toggleVersionModal();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1351,3 +1361,44 @@ updateAlbyBoostButton();
|
||||
// ========================================
|
||||
// ALBY LIGHTNING PANEL FUNCTIONALITY - END
|
||||
// ========================================
|
||||
|
||||
// ========================================
|
||||
// VERSION MODAL FUNCTIONALITY - START
|
||||
// Simple modal to display app version
|
||||
// ========================================
|
||||
|
||||
const versionBtn = document.getElementById('versionBtn');
|
||||
const versionOverlay = document.getElementById('versionOverlay');
|
||||
const versionModal = document.getElementById('versionModal');
|
||||
const versionCloseBtn = document.getElementById('versionCloseBtn');
|
||||
const versionNumber = document.getElementById('versionNumber');
|
||||
|
||||
// Set version from APP_VERSION constant (defined at top of file)
|
||||
versionNumber.textContent = APP_VERSION;
|
||||
|
||||
/**
|
||||
* Toggle the version modal open/closed
|
||||
*/
|
||||
function toggleVersionModal() {
|
||||
const isActive = versionModal.classList.contains('active');
|
||||
if (isActive) {
|
||||
versionModal.classList.remove('active');
|
||||
versionOverlay.classList.remove('active');
|
||||
} else {
|
||||
versionModal.classList.add('active');
|
||||
versionOverlay.classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
// Version button click handler
|
||||
versionBtn.addEventListener('click', toggleVersionModal);
|
||||
|
||||
// Close button click handler
|
||||
versionCloseBtn.addEventListener('click', toggleVersionModal);
|
||||
|
||||
// Overlay click handler - close modal when clicking backdrop
|
||||
versionOverlay.addEventListener('click', toggleVersionModal);
|
||||
|
||||
// ========================================
|
||||
// VERSION MODAL FUNCTIONALITY - END
|
||||
// ========================================
|
||||
|
||||
BIN
apple-touch-icon.png
Normal file
BIN
apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
BIN
favicon-96x96.png
Normal file
BIN
favicon-96x96.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
16
favicon.svg
Normal file
16
favicon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 316 KiB |
22
index.html
22
index.html
@@ -3,8 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>16-Bit Cassette Player</title>
|
||||
<title>ECHO REALITY - 16-Bit Cassette Player</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="player">
|
||||
@@ -53,6 +58,21 @@
|
||||
<span class="volume-label">VOL</span>
|
||||
<input type="range" id="volumeSlider" min="0" max="100" value="70">
|
||||
</div>
|
||||
|
||||
<!-- Version button - subtle, bottom right -->
|
||||
<button class="version-btn" id="versionBtn" title="Version Info">v</button>
|
||||
</div>
|
||||
|
||||
<!-- Version Modal -->
|
||||
<div class="version-overlay" id="versionOverlay"></div>
|
||||
<div class="version-modal" id="versionModal">
|
||||
<div class="version-modal-header">
|
||||
<span class="version-modal-title">VERSION</span>
|
||||
<button class="version-close-btn" id="versionCloseBtn">×</button>
|
||||
</div>
|
||||
<div class="version-modal-body">
|
||||
<div class="version-number" id="versionNumber">...</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="video-overlay" id="videoOverlay">
|
||||
|
||||
21
site.webmanifest
Normal file
21
site.webmanifest
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "ECHO REALITY - 16-Bit Cassette Player",
|
||||
"short_name": "ECHO REALITY",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/web-app-manifest-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "/web-app-manifest-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
],
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#000000",
|
||||
"display": "standalone"
|
||||
}
|
||||
161
styles.css
161
styles.css
@@ -1264,3 +1264,164 @@ simple-boost {
|
||||
/* ========================================
|
||||
ALBY LIGHTNING PANEL STYLES - END
|
||||
======================================== */
|
||||
|
||||
/* ========================================
|
||||
VERSION BUTTON & MODAL STYLES - START
|
||||
Subtle version indicator and info modal
|
||||
======================================== */
|
||||
|
||||
/* Version button - very subtle, bottom right of player */
|
||||
.version-btn {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 10px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #333;
|
||||
font-family: 'Courier New', monospace;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
opacity: 0.2;
|
||||
transition: opacity 0.2s;
|
||||
padding: 0;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.version-btn:hover {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* Version modal backdrop */
|
||||
.version-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.version-overlay.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Version modal container */
|
||||
.version-modal {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(0.9);
|
||||
opacity: 0;
|
||||
width: 280px;
|
||||
background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
|
||||
border: 6px solid #0a0a0a;
|
||||
border-radius: 8px;
|
||||
box-shadow:
|
||||
inset 0 0 0 2px #3a3a3a,
|
||||
inset 0 0 50px rgba(0,0,0,0.9),
|
||||
0 20px 60px rgba(0,0,0,0.8);
|
||||
z-index: 1001;
|
||||
transition: transform 0.2s ease-out, opacity 0.2s ease-out;
|
||||
font-family: 'Courier New', monospace;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.version-modal.active {
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
/* Version modal header */
|
||||
.version-modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 15px;
|
||||
background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
|
||||
border-bottom: 4px solid #000;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.version-modal-title {
|
||||
color: #00ff00;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
text-shadow:
|
||||
0 0 10px rgba(0, 255, 0, 0.5),
|
||||
0 0 20px rgba(0, 255, 0, 0.3);
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
/* Close button styled like cassette buttons */
|
||||
.version-close-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 100%);
|
||||
border: 3px solid #000;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow:
|
||||
inset 0 -2px 0 rgba(0,0,0,0.5),
|
||||
0 2px 4px rgba(0,0,0,0.6);
|
||||
transition: all 0.1s;
|
||||
}
|
||||
|
||||
.version-close-btn:hover {
|
||||
color: #aa0000;
|
||||
}
|
||||
|
||||
.version-close-btn:active {
|
||||
transform: translateY(2px);
|
||||
box-shadow:
|
||||
inset 0 -1px 0 rgba(0,0,0,0.5),
|
||||
0 1px 2px rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
/* Version modal body */
|
||||
.version-modal-body {
|
||||
padding: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Version number display - CRT style */
|
||||
.version-number {
|
||||
background: linear-gradient(180deg, #0a1a0a 0%, #050f05 100%);
|
||||
border: 3px solid #000;
|
||||
padding: 15px 20px;
|
||||
color: #00ff00;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
text-shadow:
|
||||
0 0 10px #00ff00,
|
||||
0 0 20px #00ff00;
|
||||
letter-spacing: 2px;
|
||||
box-shadow:
|
||||
inset 0 0 20px rgba(0,0,0,0.9),
|
||||
inset 0 0 5px rgba(0,255,0,0.1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Scanlines effect on version display */
|
||||
.version-number::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,0.4) 1px, rgba(0,0,0,0.4) 2px);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
VERSION BUTTON & MODAL STYLES - END
|
||||
======================================== */
|
||||
|
||||
BIN
web-app-manifest-192x192.png
Normal file
BIN
web-app-manifest-192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
web-app-manifest-512x512.png
Normal file
BIN
web-app-manifest-512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 155 KiB |
Reference in New Issue
Block a user