WordPress.org

Forums

MediaElement.js - HTML5 Video & Audio Player
autoplay="false" preload="false" do not work (10 posts)

  1. zofijeczka
    Member
    Posted 2 years ago #

    hi,
    I use code like this:
    [mejsaudio mp3="/wp-content/uploads/2013/01/01-The-Gift-The-Fight-320-Kbps.mp3" ogg="/wp-content/uploads/2013/01/01-The-Gift-The-Fight-320-Kbps1.ogg" preload="false" autoplay="false" volume="false"]

    In previous version of the plugin on WP 3.5.0 autoplay="false" was working for all music inserts.
    Now it is not working.
    preload="false" was not working then and now.

    Maybe You have some Idea about it what is not correctly working.

    All best for You!

    http://wordpress.org/extend/plugins/media-element-html5-video-and-audio-player/

  2. samplinghigh
    Member
    Posted 2 years ago #

    Hello,

    I have the same problem in Chrome (in Firefox the autoplay="false" works perfectly). Any solution would be appreciated.
    Here's my problematic open page with two videos embedded:
    http://techshow.mmklaszter.com/en/

    Thanks in advance!

  3. freque.unce
    Member
    Posted 2 years ago #

    I have a similar problem. All the players will sometimes play at once while the page is still loading. This can sometimes last longer than 10 seconds, depending on load speed for the page. I'd be grateful for a patch. I'm not very good with java. It'd be sweet if I could even just have the interim players automatically muted. https://dl.dropbox.com/u/18436485/buffer.png

  4. freque.unce
    Member
    Posted 2 years ago #

    I managed to fix my problem by using the literal html rather than the shortcode.

    I have a template page and I replaced this method:
    do_shortcode('[audio mp3="' . "$filename" . '" preload="false" autoplay="false"]');

    with this method:
    <audio src="$filename" type="audio/mp3" width="500" height="30" > </audio>;

    It behaves the same, except the interim players are muted while the page is loading. Hopefully someone else will find this useful.

  5. Wenci
    Member
    Posted 2 years ago #

    I had the same problem! the solution is to close the audio tag with square brackets like this:

    [audio src="http://site.XXX/XXX/XXX.mp3" type="audio/mp3" width="500" height="30"] [/audio]

    :D

    This is the solution i think it will work for the video player too so close it with [/video]

  6. freque.unce
    Member
    Posted 2 years ago #

    My described method above didn't actually work for me, it produced non-working players. Wenci's method didn't work for me either, within a template, but I rewrote my template shortcode similar to Wenci's method, specifying the filetype, and it seems to be working great. The key here seems to be specifying the filetype, right in the shortcode.

    Original:
    do_shortcode('[audio mp3="' . "$filename" . '" preload="false" autoplay="false"]');

    Patched:
    do_shortcode('[audio mp3="' . "$filename" . '" type="audio/mp3"]');

    I will repost if I notice any problems.

  7. Wenci
    Member
    Posted 2 years ago #

    freque.unce do you have both jetpack and mediaelement.js installed?
    looks like they might go in conflict..my method above was working for my local developing site on the hosted site with both mediaelement and jetpack installed:
    at first the track wasn't showing up with the audio closing tag; then i used the [mejsaudio src="http://xxx.com/xxx/wp-content/uploads/music/abc.mp3" type="audio/mp3" width="500" height="30"] [/mejsaudio] and it worked fine

  8. freque.unce
    Member
    Posted 2 years ago #

    I don't run jetpack, but I do run BP-Gallery from buddydev, which uses mediaelement for some of it's core functions. It's certainly possible the bugs I was experiencing were related to some sort of conflict with a plugin or my theme. Including the filetype within the shortcode swiftly fixed the problem for me, so I'm a happy camper. Thanks so much for posting.

  9. kristin.e
    Member
    Posted 2 years ago #

    Hi, I've tried all suggestions listed above but nothing seems to work for internet explorer - the mp3 just automatically plays when the page loads. Here is my shortcode:

    <?php echo do_shortcode('[mejsaudio src="http://www.sitename.co.uk/wp-content/uploads/2011/03/podcast.mp3" type="audio/mp3" width="140" autoplay="false" pause="true" volume="false" />] [/mejsaudio]'); ?>

    Any other suggestions would be appreciated.

    Thanks

  10. Hasan R
    Member
    Posted 2 years ago #

    Should this be preload="none"?

    Found this link useful.
    stevesouders.com/tests/mediaevents.php?preload=none&t=1372160085

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MediaElement.js - HTML5 Video & Audio Player
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic