Describe the bug
When accessing a video asset via a share link, the stream_url returned by the API points to the S3 folder prefix instead of the HLS master playlist file.
Expected:
https://s3.../processed/.../master.m3u8
Actual:
https://s3.../processed/... (folder, no master.m3u8)
<video src="https://sos-ch-dk-2.exo.io/freeframe-vps/processed/.../[VERSION_ID]?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=[REDACTED]..." ...>
Root cause:
In apps/api/routers/share.py around line 297, the stream_url for the share asset overview endpoint uses:
stream_url = generate_presigned_get_url(media_file.s3_key_processed)
For videos, s3_key_processed is the HLS folder prefix. The /master.m3u8 suffix is missing.
The fix already exists in get_share_stream_url (line ~1375) and in assets.py. The same pattern should be applied here:
if asset.asset_type.value == "video":
s3_key = f"{media_file.s3_key_processed}/master.m3u8"
else:
s3_key = media_file.s3_key_processed
stream_url = generate_presigned_get_url(s3_key)
Steps to reproduce
- Upload a video asset
- Create a public share link
- Open the share link
- Inspect the
Expected behavior
The share link video player uses the HLS master playlist URL ending in /master.m3u8, so the video streams correctly via HLS adaptive bitrate.
Screenshots
Area
Backend (FastAPI)
Version / Commit
latest main
Describe the bug
When accessing a video asset via a share link, the stream_url returned by the API points to the S3 folder prefix instead of the HLS master playlist file.
Expected:
https://s3.../processed/.../master.m3u8
Actual:
https://s3.../processed/... (folder, no master.m3u8)
Root cause:
In apps/api/routers/share.py around line 297, the stream_url for the share asset overview endpoint uses:
For videos, s3_key_processed is the HLS folder prefix. The /master.m3u8 suffix is missing.
The fix already exists in get_share_stream_url (line ~1375) and in assets.py. The same pattern should be applied here:
Steps to reproduce
Expected behavior
The share link video player uses the HLS master playlist URL ending in /master.m3u8, so the video streams correctly via HLS adaptive bitrate.
Screenshots
Area
Backend (FastAPI)
Version / Commit
latest main