Skip to content

Conversation

@piano1029
Copy link
Contributor

Description

Firefox doesn't load the entire file before playing resulting in the duration of the audio element changing until playback is near the end of the file, but the onLoadedMetadata event doesn't get triggered again. This results in the progress bar just displaying infinity and NaN on Firefox.

This pr adds a fallback, if the total duration is NaN a request is sent to /podcast/episode/{id} to retrieve the total duration and updates the audio metadata with the correct duration.

Linked Issues

None

Firefox doesn't do the audio element's duration correctly, causing the total duration to appear as NaN.
@SamTV12345
Copy link
Owner

Thanks for the pull request :). Really appreciated as I don't really use Firefox so I would never call this bug.

@SamTV12345 SamTV12345 merged commit 811e6b2 into SamTV12345:main Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants