6 Commits

Author SHA1 Message Date
cottongin
373fe8b835 cleanup project, branding 2026-01-18 18:27:35 -05:00
cottongin
2a839de999 add favicon 2026-01-18 07:01:56 -05:00
cottongin
bbf4d88f61 fix initial page load for track duration 2026-01-17 21:13:58 -05:00
cottongin
ffc8f2a558 add version info 2026-01-17 19:09:53 -05:00
cottongin
5223c9697f tweak README 2026-01-17 18:45:02 -05:00
cottongin
fdc96965f3 add README 2026-01-17 18:42:03 -05:00
13 changed files with 282 additions and 4 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.DS_Store
.old/
.cursor/
.cursor/
tag-release.sh

20
README.md Normal file
View 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`)

BIN
assets/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
assets/favicon-96x96.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

3
assets/favicon.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 206 KiB

21
assets/site.webmanifest Normal file
View File

@@ -0,0 +1,21 @@
{
"name": "ECHO REALITY",
"short_name": "ECHO REALITY",
"icons": [
{
"src": "/assets/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/assets/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@@ -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
======================================== */

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@@ -3,8 +3,14 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>16-Bit Cassette Player</title>
<link rel="stylesheet" href="styles.css">
<title>ECHO REALITY</title>
<link rel="icon" type="image/png" href="/assets/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg" />
<link rel="shortcut icon" href="/assets/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="ECHO REALITY" />
<link rel="manifest" href="/assets/site.webmanifest" />
<link rel="stylesheet" href="assets/styles.css">
</head>
<body>
<div class="player">
@@ -53,6 +59,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">&times;</button>
</div>
<div class="version-modal-body">
<div class="version-number" id="versionNumber">...</div>
</div>
</div>
<div class="video-overlay" id="videoOverlay">
@@ -141,6 +162,6 @@
<audio id="audio" preload="metadata"></audio>
<script src="app.js"></script>
<script src="src/app.js"></script>
</body>
</html>

View File

@@ -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
// ========================================