Buffer an entire track with mediaelement.js

370 Views Asked by At

I believe that mediafire download links are screwing my mediaelement.js player if it doesn't download the entire track. Not sure why this would be, but it randomly will stop buffering and respond with "resource failed to load" but only after like 2 minutes into a song and only on certain songs.

I need a way to tell mediaelement.js to buffer the entire track and not just the next 30 seconds, is this possible? I haven't found anything in the documentation regarding this

EDIT: Maybe it has something to do with that the MIME type set by mediafire is Mpeg rather than a streaming type

1

There are 1 best solutions below

0
On

If MediaFire marks the song as copyrighted, then only the file owner and paid subscribers are allowed to play the full length of the song. If you aren't the file owner or are a free user, you will get cut off after a portion of the song is played. You can see this when you use their player on their website.

This would make sense for MediaFire to give you an error message (perhaps even if the error message is the wrong one), so that you know you no longer can play the song and streaming should stop.