From c67a5cde16c68290ac538f776f810758f610ee3a Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 8 Feb 2026 15:23:01 +0000 Subject: [PATCH] handle application/vnd.apple.mpegurl. --- backend/main.py | 186 ++++++++++++++++++++++++++++++++++-------------- frontend/app.js | 126 +++++++++++++++++++++++++------- 2 files changed, 232 insertions(+), 80 deletions(-) diff --git a/backend/main.py b/backend/main.py index 68d3c86..5d24631 100644 --- a/backend/main.py +++ b/backend/main.py @@ -6,6 +6,7 @@ from requests.adapters import HTTPAdapter from urllib3.util import Retry import yt_dlp import io +from urllib.parse import urljoin # Serve frontend static files under `/static` to avoid colliding with API routes app = Flask(__name__, static_folder='../frontend', static_url_path='/static') @@ -105,7 +106,7 @@ def videos_proxy(): def index(): return send_from_directory(app.static_folder, 'index.html') -@app.route('/api/stream', methods=['POST', 'GET']) +@app.route('/api/stream', methods=['POST', 'GET', 'HEAD']) def stream_video(): # Note: