Time delay on an iframe-based audio player?

by MarkR
3 replies
Hi,

I have just put an iframe into my sales page that plays an audio clip. Don't ask why I'm using an iframe -- that's what the software needs. It works great.

Is there a way to delay the automatic playing of the clip by say 15 seconds or so? That feature is not built into the web-based audio player I'm using. Here's the code...

<p><iframe src='http://www.audioplayersite.com/ap.php?url=http://www.mysite.com/audio.mp3&audiotitle=titlehere&autoplay=yes' width='250' height='35' align='middle' scrolling='no' frameborder='0'></iframe></p>
#audio #delay #iframebased #player #time
  • Profile picture of the author mywebwork
    Hi Mark

    Not sure if this will work for you, but I was thinking that you could first load a page into your iFrame that has a time-delayed redirect set for 15 seconds. Your initial page would display for 15 seconds and then redirect to your player page.

    A way to create this redirect with JavaScript is detailed here:

    Javascript Tutorial - Redirect

    Hope this helps!

    Bill
    {{ DiscussionBoard.errors[1205631].message }}
  • Profile picture of the author mywebwork
    Hi Mark

    You don't need to be able to edit the audio page, that's the page you would redirect to after displaying your "temporary" page for 15 seconds. Your new "temporary" page and your main page with the iFrame are all you need to edit.

    The sequence is as follows:

    1 - Build your "temporary" page to display some text that you want users to see before the audio begins. Include the JavaScript to redirect to your (external) audio page after a 15 second delay.

    2 - Edit the code you provided earlier, set your frame source to be the new page you just made.

    3 - That's it! Visitors to your site will now see your "temporary" page in the iFrame for 15 seconds. After that the iFrame contents will be your audio program.

    Hope that makes sense, PM me if you need any help with this..

    Bill
    {{ DiscussionBoard.errors[1207413].message }}

Trending Topics