• Hi. I would like to have an embedded small play/pause button in my Slider Revolution plugin on the home/main page with text next to it Play Crazy Jingle. When play button is clicked it plays the mp3 audio file staying on the same page without going to another page. How to do this? I tried various plugins and HTML codes and nothing works.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • If I understand you correctly you want a audio media playback that will continue playing even if the user navigates to a new page?

    The only way to really do this is to set it up so that your “trigger” (apparently a slideshow carousel?) creates a new browser window with your media playback inside of that. As long as the user initiates the action, you can then progromatically start the playback inside the new window with javascript.

    But here’s some issues you should consider before doing this.
    1) Opening up new windows and grabbing focus and starting up audio playback without express user interaction is a very poor user experience.
    2) It’s also extremely bad for accessibility reasons.
    3) This approach could be just as annoying as popup ads and may end up driving traffic away from your site.

    So, you want to start playing the jingle upon a click, without any need for a new page to load.
    That kind of thing is usually done like this:
    Add a link to “#” with an on-click javascript action. Since the link is to #, you won’t get any pageload.

    Thread Starter michaellanfield

    (@michaellanfield)

    Hello and thank you for responding. I would like a jingle that plays not automatically when the website loads, but only once when a person clicks on a play play button. I would like this jingle to be played only on the homepage somewhere in Revolution Slider and no where else. The jingle is only 5 seconds long and I do not want it played when a user goes to another page, just on the front/home page. How can this be done?

    Thread Starter michaellanfield

    (@michaellanfield)

    Anyone?

    There are a few problems with your question:
    1. The sound would, obviously NOT be played inside revslider, but through the loudspeaker/earphone… of the visitor. In order for this to happen, the corresponding instructions and links need to be present anywhere on your page. If the content in the slider is changing all the time, then it’s probably better to put this somewhere nearby, but outside of the slider, especially if the slider doesn’t actually include support for sound files.

    2. You’re referring to revslider, which is not publicly available. I have no experience dealing with it. If you specifically want to squeeze something into it, then you´d be better off using their user forum (if there’s any) or talking to their customer support.

    3. I don’t know the origin of the theme you’re using, “PRO”. But it doesn’t show up in search among the free themes at wordpress.org. So here, too, I don’t have enough information to actually help you.

    Now, having said this. Here’s a hint to a possible solution.
    In most recent versions of WordPress, it’s become very easy to add an mp3 as an “audio widget”. If your theme has got support for widget areas, then you could simply upload your mp3 to your media files and include it in a widget.

    By the way: When I browse internet, javascript is by default blocked. To me, your site renders as a header with a menu, and then just a large chunk of white space.

    Thread Starter michaellanfield

    (@michaellanfield)

    Hi Tor and thanks for replying.

    There are a few problems with your question:
    1. The sound would, obviously NOT be played inside revslider, but through the loudspeaker/earphone… of the visitor. In order for this to happen, the corresponding instructions and links need to be present anywhere on your page. If the content in the slider is changing all the time, then it’s probably better to put this somewhere nearby, but outside of the slider, especially if the slider doesn’t actually include support for sound files.

    – I just want a play button that has text beside, play our jingle! somewhere on the front/home page and users ability to click and play an MP3. But so they don’t leave the page. That is basically what I would like.

    Now, having said this. Here’s a hint to a possible solution.
    In most recent versions of WordPress, it’s become very easy to add an mp3 as an “audio widget”. If your theme has got support for widget areas, then you could simply upload your mp3 to your media files and include it in a widget.

    – I understand this solution and it worked for me, the only issue is I just want a play button and not a large media player. When I added wordpress mp3 generic player it did not look good.

    By the way: When I browse internet, javascript is by default blocked. To me, your site renders as a header with a menu, and then just a large chunk of white space.

    – What do you mean by this. I don’t understand.

    Thanks for all your help.

    >> I just want a play button that has text beside, play our jingle! somewhere on the…

    You can search for various plugins that might help you:
    https://wordpress.org/plugins/search/mp3+player/
    Perhaps this one: https://wordpress.org/plugins/compact-wp-audio-player/

    Or, for a lean and adapted solution, get inspired by the sample code on https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_audio_play
    Where you’ve got an audio element without controls, therefore “invisible”, and controlled by javascript events.

    >> By the way: When I browse internet, javascript is by default blocked

    As a security precaution, I use the NoScript plugin in my browser. If I visit a site, which is not in my personal “whitelist”, javascripts will not be executed. Some sites depend heavily on scripting and won’t render when scripting is turned off. By the way: if important content on your site depends on scripting being enabled, then you should have in mind that it’s possible that google won’t be able to index your content, and visitors, who use other screenreaders or other enabling technologies perhaps can’t read your content.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘When clicking image play MP3 in same website?’ is closed to new replies.