Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Keep music playing on all pages?

  1. #1
    Join Date
    Mar 2010
    Location
    Washington, DC
    Posts
    22
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Keep music playing on all pages?

    Hi
    I currently have an mp3 file playing on the home page of a restaurant website ( I know and agree with the anti-music-on-web-pages movement, but it was a client's call, so please spare me.) using the <embed> tag. How do I get the music to play continuously as visitors navigate through pages of the website?

    Please and thanks

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    The only way is with frames. Set a left and right frame set, make the left frame set 1px wide by 100% height.

    Embed the music in this left frame set (overflow hidden). Music will play while content in right frame changes.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    If the clients only requirement for the site is for the music to play the whole way you could make the whole site in flash ... Limits audience and search-ability of page though.
    Corrections to my coding/thoughts welcome.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    The way that this is done on most modern sites (for example facebook) is that the entire site is designed to load through Ajax and NOT through normal links. Of course this requires Ajax (Javascript) is enabled/working, but for most people this will be the case-- though not all. Others will just reload everything each time.
    This means that everything is difficult to setup because you are constantly requesting and serving partial pages then dealing with them in Javascript and it will be difficult to program. But then on facebook you can keep chat windows open while loading other pages.

    Of course the non-Javascript alternative to this is using frames which would make your job a lot easier. The downside to that is using frames, and the problems that come with frames. (Very few technical issues, really, just that they are annoying to work with/use.)



    Be aware that this approach is basically the opposite of how the web is designed: mainly, whole pages are supposed to be loaded, and secondarily small portions of pages can be loaded dynamically. Instead, you (and others) are attempting to load dynamically almost ALL of the page, except one part while leaving that static. It's technically possible using the same methods but much more complex and not standardized so it won't be easy.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    I don't recommend that. As a Flash user I love the idea, but talk about more problems than it's worth. Trying to sync the music with each menu button click, or link click.. Its a huge hassle.

    <edit> Didn't see djr's post prior...

    Quote Originally Posted by djr33 View Post
    Be aware that this approach is basically the opposite of how the web is designed: mainly, whole pages are supposed to be loaded, and secondarily small portions of pages can be loaded dynamically. Instead, you (and others) are attempting to load dynamically almost ALL of the page, except one part while leaving that static. It's technically possible using the same methods but much more complex and not standardized so it won't be easy.
    Ahh, if only I hadn't removed the one I had that way. It was very simple. It worked and validated, and there were no browser issues.

    Perhaps I will make it again. It was so super simple. ALMOST made me like frames. Almost.
    Last edited by BLiZZaRD; 03-26-2010 at 10:06 PM.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    It's not possible that there were no browser issues-- it may be compatible with all browsers, but if Javascript is disabled everything gets messy. But I'd like to see a framework that works well for that.


    More importantly, here's an easy way to do this:
    launch the music player in a popup window (or just new window if Javascript is disabled for 'popups' specifically), then the user can operate your site and music independently. (Of course you can offer the user a choice to keep it in the window or launch as a popup if you'd prefer that.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    There wasn't any javascript involved. That's my point

    When I get a free moment from school and work I will redo it. I may even have a back up copy I can just re-upload. I will check.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  8. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    What's the main approach to it, if you aren't using frames and you aren't using Javascript?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #9
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,486
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    We must have crossed somewhere. It is using frames, same method as my first post here. No JS though.
    {CWoT - Riddle } {OSTU - Psycho} {Invasion - Team}
    Follow Me on Twitter: @Negative_Chaos
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  10. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    Oh, "almost made me like frames", I read as "almost ... like frames". Anyway....

    Ok, that would work then.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •