SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    India
    Posts
    73
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    run mp3 in background and switch pages without stopping it

    i am running mp3 in background and when i switch pages of site it stops and start again on next page. what should i do(through PHP) to play it continously?

    thankyou

  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,079
    Mentioned
    53 Post(s)
    Tagged
    0 Thread(s)
    Not really possible... If I were you, I'd look at setting up a simple AJAX body. This will allow you to load in a new body section (a new page of content) without actually leaving the current page.

    Once you create a new HTTP request, your going to have an interruption in your music.

    EDIT: Probably not very SEO friendly, another other suggestions?

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    India
    Posts
    73
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ya i was also thinking this only...btw thanks wolfe

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    It's technically possible with the dreaded iframe.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  5. #5
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Or ... don't play an MP3.

    Unless the website is a music site or for a band/artist then having background music is annoying.
    Ian Anderson
    www.siteguru.co.uk

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,048
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by siteguru
    Unless the website is a music site or for a band/artist then having background music is annoying.
    nope… still annoying.
    The only code I hate more than my own is everyone else's.

  7. #7
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    988
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by siteguru View Post
    Or ... don't play an MP3.

    Unless the website is a music site or for a band/artist then having background music is annoying.
    Although on a band website the play button should be very obvious, Even here it shouldn't start until the user asks it to.

  8. #8
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    It could be done with backbonejs or similar javascript MVC framework, but that would probably require to rewrite whole application. On the other hand having background music on the site is not the best practice.

  9. #9
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP does not deal with audio players, flash players, ajax, css, html, or any type of players or client side language. AJAX being partly server-side, but it is a different language set altogether.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •