WordPress.org

Ready to get started?Download WordPress

Forums

WPaudio MP3 Player
[resolved] Progress Bar issues on Chrome and Safari (8 posts)

  1. rahul286
    Member
    Posted 3 years ago #

    Hi Todd,

    Thanks for a nice plugin.
    While customizing it for a client, I found a bug. (actually client found this bug, I just fixed it)

    In HTML5 player function...

    function WpaudioHTML5 (parent) {
    			...
    }

    Lines...

    start = player.seekable.start();
    end = player.seekable.end();

    Should be

    start = player.buffered.start();
    end = player.buffered.end();

    seekable and buffered seems same but they have a small difference.

    "seekable" failed in my case because of following note at http://dev.w3.org/html5/spec/video.html#seeking

    If the user agent can seek to anywhere in the media resource, e.g. because it is a simple movie file and the user agent and the server support HTTP Range requests, then the attribute would return an object with one range, whose start is the time of the first frame (the earliest possible position, typically zero), and whose end is the same as the time of the first frame plus the duration attribute's value (which would equal the time of the last frame, and might be positive Infinity).

    Related post on this topic is - http://happyworm.com/blog/2010/10/04/html5-media-seeking-and-the-buffered-attribute/

    Also, I noticed another strange thing.
    My safari started buffering automatically which I didn't like.

    So I fixed by adding following line...

    player.preload = "none";

    after lines...

    player.src = parent.getUrl();
    player.volume = 1;

    If you find these fixes helpful, add them up in your code.

    Keep up the good work. :-)

    Thanks,
    -Rahul

  2. maxemil
    Member
    Posted 3 years ago #

    These changes are cool... thanks Rahul.
    ( in the wpaudio.js file )

    Awsome plugin btw!

  3. rahul286
    Member
    Posted 3 years ago #

    Yep. Out of all plugins we tried, best for the job at hand.

    Also its source-code are very easy to understand.

  4. mes
    Member
    Posted 2 years ago #

    @rahul286, I replaced the lines of code with your changes and the player on my site still buffers every track upon page load in Chrome and Safari. Is there any way you could be missing something?

  5. rahul286
    Member
    Posted 2 years ago #

    @Mes
    Try clearing your browser cache.
    JS/CSS files might be coming from browser cache.

    Can you confirm by running JS debugger that changes are being executed properly in browser?

  6. mes
    Member
    Posted 2 years ago #

    Yea I cleared the cache and it still preloads all of the tracks. How do you run JS debugger?

  7. rahul286
    Member
    Posted 2 years ago #

  8. cailen
    Member
    Posted 2 years ago #

    Thanks a lot - this was causing a crash in Safari when a large number of players (approximately 20+) were present on one page.

    I've written a short article on the crash with your instructions - I really appreciate your sharing this information. Here's the link:

    http://kmsm.ca/2011/wpaudio-wordpress-plugin-crashes-safari-browser-when-song-is-played-from-post/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic