|
728 | 728 | <div style="position:absolute;bottom:8px;left:24px;width:40px;height:40px;border-bottom:1px solid rgba(0,212,255,0.2);border-left:1px solid rgba(0,212,255,0.2);"></div> |
729 | 729 | <div style="position:absolute;bottom:8px;right:24px;width:40px;height:40px;border-bottom:1px solid rgba(0,212,255,0.2);border-right:1px solid rgba(0,212,255,0.2);"></div> |
730 | 730 |
|
| 731 | +<!-- Splash music: Kevin MacLeod — Jazz Brunch (incompetech.com, CC BY 4.0 — incompetech.com/music/royalty-free/music.html). Short Pixabay clip fallback if primary fails to load. --> |
731 | 732 | <audio id="tp-intro-music" loop preload="auto" playsinline> |
732 | | - <source src="https://assets.mixkit.co/music/preview/mixkit-tech-house-vibes-130.mp3" type="audio/mpeg"> |
| 733 | + <source src="https://incompetech.com/music/royalty-free/mp3-royaltyfree/Jazz%20Brunch.mp3" type="audio/mpeg"> |
| 734 | + <source src="/static/splash-intro-fallback.mp3" type="audio/mpeg"> |
733 | 735 | </audio> |
734 | 736 |
|
735 | | - <button type="button" id="tp-audio-toggle" aria-pressed="false" aria-label="Turn sound on" title="Sound off — click for ambient music" |
| 737 | + <button type="button" id="tp-audio-toggle" aria-pressed="false" aria-label="Turn sound on" title="Sound off — click for retro trading-floor jazz" |
736 | 738 | style=" |
737 | 739 | position: absolute; |
738 | | - bottom: 22px; |
| 740 | + bottom: 46px; |
739 | 741 | left: 22px; |
740 | 742 | z-index: 12; |
741 | 743 | display: inline-flex; |
|
764 | 766 | <span id="tp-audio-toggle-label">Sound off</span> |
765 | 767 | </button> |
766 | 768 |
|
| 769 | + <div style=" |
| 770 | + position: absolute; |
| 771 | + bottom: 14px; |
| 772 | + left: 22px; |
| 773 | + z-index: 12; |
| 774 | + font-size: 9px; |
| 775 | + color: rgba(148, 163, 184, 0.45); |
| 776 | + font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; |
| 777 | + max-width: 240px; |
| 778 | + line-height: 1.35; |
| 779 | + pointer-events: none; |
| 780 | + "> |
| 781 | + Music: Kevin MacLeod · Jazz Brunch (CC BY) |
| 782 | + </div> |
| 783 | + |
767 | 784 | </div> |
768 | 785 |
|
769 | 786 | <style> |
|
979 | 996 | var on = !introMusic.paused; |
980 | 997 | audioToggleBtn.setAttribute('aria-pressed', on ? 'true' : 'false'); |
981 | 998 | audioToggleBtn.setAttribute('aria-label', on ? 'Turn sound off' : 'Turn sound on'); |
982 | | - audioToggleBtn.title = on ? 'Sound on — click to mute' : 'Sound off — click for ambient music'; |
| 999 | + audioToggleBtn.title = on ? 'Sound on — retro jazz (click to mute)' : 'Sound off — click for retro trading-floor jazz'; |
983 | 1000 | if (audioToggleLabel) audioToggleLabel.textContent = on ? 'Sound on' : 'Sound off'; |
984 | 1001 | if (audioToggleIcon) { |
985 | 1002 | audioToggleIcon.innerHTML = on |
|
995 | 1012 | } |
996 | 1013 |
|
997 | 1014 | if (introMusic) { |
998 | | - introMusic.volume = 0.4; |
| 1015 | + introMusic.volume = 1; |
999 | 1016 | introMusic.load(); |
1000 | 1017 | introMusic.addEventListener('error', function() { |
1001 | | - audioLoadFailed = true; |
1002 | | - syncIntroAudioButton(); |
| 1018 | + window.setTimeout(function() { |
| 1019 | + if (introMusic.networkState === 3) { |
| 1020 | + audioLoadFailed = true; |
| 1021 | + syncIntroAudioButton(); |
| 1022 | + } |
| 1023 | + }, 250); |
1003 | 1024 | }); |
1004 | 1025 | introMusic.addEventListener('play', syncIntroAudioButton); |
1005 | 1026 | introMusic.addEventListener('pause', syncIntroAudioButton); |
|
0 commit comments