Skip to content

Commit ef64146

Browse files
authored
fix: delayed waveform loading (#538)
1 parent 7c51e10 commit ef64146

2 files changed

Lines changed: 1 addition & 19 deletions

File tree

server/reflector/views/transcripts_audio.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,6 @@ async def transcript_get_audio_mp3(
5151
transcript_id, user_id=user_id
5252
)
5353

54-
if transcript.audio_location == "storage":
55-
# proxy S3 file, to prevent issue with CORS
56-
url = await transcript.get_audio_url()
57-
headers = {}
58-
59-
copy_headers = ["range", "accept-encoding"]
60-
for header in copy_headers:
61-
if header in request.headers:
62-
headers[header] = request.headers[header]
63-
64-
async with httpx.AsyncClient() as client:
65-
resp = await client.request(request.method, url, headers=headers)
66-
return Response(
67-
content=resp.content,
68-
status_code=resp.status_code,
69-
headers=resp.headers,
70-
)
71-
7254
if transcript.audio_location == "storage":
7355
# proxy S3 file, to prevent issue with CORS
7456
url = await transcript.get_audio_url()

www/app/(app)/transcripts/[transcriptId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
3232
const topics = useTopics(transcriptId);
3333
const waveform = useWaveform(
3434
transcriptId,
35-
waiting || mp3.loading || mp3.audioDeleted === true,
35+
waiting || mp3.audioDeleted === true,
3636
);
3737
const useActiveTopic = useState<Topic | null>(null);
3838

0 commit comments

Comments
 (0)