From 3436a22a94453f7677933e493182e61c8a9c4d18 Mon Sep 17 00:00:00 2001 From: gilesb Date: Wed, 7 Jan 2026 20:58:40 +0000 Subject: [PATCH] Fix iOS video playback in list views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use video_src_for_request() for iOS MP4 transcoding in: - ui_runs partial - ui_cache_list partial - ui_run_partial (also added request parameter) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- server.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/server.py b/server.py index 350d0ee..74ff53c 100644 --- a/server.py +++ b/server.py @@ -1426,7 +1426,8 @@ async def ui_runs(request: Request):
''') if input_media_type == "video": - html_parts.append(f'') + input_video_src = video_src_for_request(input_hash, request) + html_parts.append(f'') elif input_media_type == "image": html_parts.append(f'input') html_parts.append('
') @@ -1441,7 +1442,8 @@ async def ui_runs(request: Request):
''') if output_media_type == "video": - html_parts.append(f'') + output_video_src = video_src_for_request(output_hash, request) + html_parts.append(f'') elif output_media_type == "image": html_parts.append(f'output') html_parts.append('
') @@ -1551,7 +1553,8 @@ async def ui_cache_list( ''') if media_type == "video": - html_parts.append(f'') + video_src = video_src_for_request(content_hash, request) + html_parts.append(f'') elif media_type == "image": html_parts.append(f'{content_hash[:16]}') else: @@ -1871,7 +1874,7 @@ async def ui_detail_page(run_id: str, request: Request): @app.get("/ui/run/{run_id}", response_class=HTMLResponse) -async def ui_run_partial(run_id: str): +async def ui_run_partial(run_id: str, request: Request): """HTMX partial: single run (for polling updates).""" run = load_run(run_id) if not run: @@ -1942,7 +1945,8 @@ async def ui_run_partial(run_id: str):
''' if input_media_type == "video": - html += f'' + input_video_src = video_src_for_request(input_hash, request) + html += f'' elif input_media_type == "image": html += f'input' html += '
' @@ -1956,7 +1960,8 @@ async def ui_run_partial(run_id: str):
''' if output_media_type == "video": - html += f'' + output_video_src = video_src_for_request(output_hash, request) + html += f'' elif output_media_type == "image": html += f'output' html += '
'