Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    The thing is that FancyBox cannot ‘play’ anything. You either need a player (flash of script), a browser plugin or native browser support to play MP3. Same goes for movies. It’s usually a player provided by Youtube or Vimeo or Dailymotion that plays the movies.

    Plus, most people don’t see the point in using a lightbox to display a relatively dull player that ‘only’ produces sound… Might as well just embed it straigth on the page and allow people to continue reading while the sound is played.

    Anyway, if you still want a lightbox to play MP3s, then there are several possibilities:

    If you are using an external provider/host like Soundcloud for your MP3 files, you could use their player to be shown in FancyBox via iFrame or Inline Content mode.

    Or you could try embedding the WordPress integrated MediaElements player and make it pop up in FancyBox in Inline mode. Try:

    <a href="#myplayer-1" class="fancybox-inline">Open MP3 in lightbox</a>
    <div class="fancybox-hidden"><div id="myplayer-1" class="hentry">
    [audio mp3="http://url.to/your/file.mp3"][/audio]
    </div></div>
    Thread Starter wireB

    (@wireb)

    I would like to commend you on your great contribution which Easy FancyBox presents.

    The solution I am looking for is to first not have to install yet another plugin – if possible. Secondly, EFB would be consistent with how Easy FancyBox utilizes images or text as the link to the embedded player. There are times when an author would like to capture audio (self-hosted) then allow EFB (Easy FancyBox) to be able to manage that audio file as it does Youtube and other video formats.

    Thank you for your explanation on how EFB is a a player for the various videos. Although I understand this, it seems like a natural path to have EFB also utilize self-hosted MP3 files. In other words, EFB would work with most media files as it does with the other several video formats.

    An alternative would be to have EFB utilize a WP-plugin which is specifically for playing a self-hosted audio file. You only need to install the plugin and then EFB controls it within its settings.

    Best regards and congratulations for a 5-star plugin.

    No need for another plugin. Just use the one included with WordPress already via the method described above:

    <a href="#myplayer-1" class="fancybox-inline">Open MP3 in lightbox</a>
    
    <div class="fancybox-hidden">
    <div id="myplayer-1" class="hentry">
    [audio mp3="http://url.to/your/file.mp3"][/audio]
    </div>
    </div>

    Note: this won’t work in a text widget, unless you add the following code to your themes functions.php:

    add_filter('widget_text', 'do_shortcode');
    Thread Starter wireB

    (@wireb)

    Could this be added within an EFB field to make things easier for the non-coding, non-tech, scared of html author?

    Thanks you for your response.

    It could but I do not have time to do it… At least not soon. I’ll add it to the feature request list though 😉

    Thread Starter wireB

    (@wireb)

    Be willing to support your work purchasing the Pro version. Thank you for considering the addition.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Playing mp3 in Easy Fancybox’ is closed to new replies.