feat: stream MP3s through backend proxy endpoint
- Replace /audio/<token>/<v>.mp3 with /api/stream/<token>/<v>.mp3. - Stream bytes from private storage with Accept-Ranges and Content-Range support. - Keep old /audio route returning 404. - Update player page JS to use new stream endpoint.
This commit is contained in:
parent
5863c32e35
commit
3057eb8eda
2 changed files with 73 additions and 11 deletions
|
|
@ -143,8 +143,8 @@
|
|||
<script>
|
||||
(function(){
|
||||
// Audio sources are assigned via JS so they do not appear in static HTML source.
|
||||
document.getElementById('player-a').src = "{{ url_for('audio', token=req.player_token, version='a') }}";
|
||||
document.getElementById('player-b').src = "{{ url_for('audio', token=req.player_token, version='b') }}";
|
||||
document.getElementById('player-a').src = "{{ url_for('stream_audio', token=req.player_token, version='a') }}";
|
||||
document.getElementById('player-b').src = "{{ url_for('stream_audio', token=req.player_token, version='b') }}";
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Reference in a new issue