Issue #253 mp3 audio seek fix #320
No reviewers
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#320
Loading…
Reference in a new issue
No description provided.
Delete branch "issue253"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implemented a workaround to load the entire media file using xhr if an audio media element is detected after the metadata is loaded.
I published a test MP3 file to lbry://beyed.
What is that actual cause of this issue? It's only a subset of audio files that are not seekable afaik. Seems a bit unfortunate if we have to download the entire file for all audio files to fix the bad ones.
According to the issue at https://github.com/lbryio/lbry-app/issues/253, it appears that the player cannot seek through the file until it has finished playing at least once, which indicates that the length is not determined when the media file is first loaded. I can try to limit this to just files with the have the content type, "audio/mpeg3" or "audio/mpeg". Although it's not perfect, it limits the full load to just MP3 audio files.
I'd like confirmation that the render-media plugin has this issue for all MP3s before merging this. @akinwale could you try confirming this issue exists with the plugin directly?
@kauffj @akinwale perhaps we could check if a file is seekable or not and delay playback until it is so we catch any unseekable file types.
We already know when the metadata has been loaded in the current implementation (using the
metadataloaded
event https://developer.mozilla.org/en/docs/Web/Guide/Events/Media_events). It's possible to check if a file is seekable too https://www.w3schools.com/tags/av_prop_seekable.asp.@kauffj From further testing, I tried adding the audio element to the media container directly using
downloadPath
for thesrc
attribute, and the audio was seekable, so it looks like the problem could be with the render-media plugin, perhaps with the way the file stream is being created. Considering this is the case, I think we can handle theaudio/mpeg
content type differently by appending the HTML5 audio element directly, while every other type content type will be handled by render-media. What do you recommend?@6ea86b96 I tried to use this but it doesn't work. The seekable time range end returns a value (which is less than the audio duration), but I am still unable to seek when I try to drag the control.
@akinwale Bypassing render-media and using the audio element directly sounds like a reasonable solution to me.
@kauffj Pushed a new commit.
contentType
property to theVideoPlayer
component.renderAudio
method which is used instead of render-media if thecontentType
isaudio/mpeg3
oraudio/mpeg
.