Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Play sound when page updates

    I have a webpage with a lot of dynamic content, for example several different discussion boards, blogs and similar. I plan to make a page that monitors all of these boards and blogs, for example with a query from the MySQL database that shows the ten last entries in all the boards and blogs. The page will update every minute. Such a page will make it easier for people to monitor what is going on on my website.

    However, is it possible to play a sound every time the content of the page is changed? For example if a new blog entry is added a sound is played. I guess there has to be some way of detecting that the page is changed? Do you have any suggestions as to how I can solve this?

    My pages are built with PHP and MySQL.

    Thanks in advance!

  • #2
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    You could use an embedded streaming media codec ...

    *BUT*

    Web pages that are chock full of bells and whistles (literally) have a tendecy to make me want to smash the PC ... There's nothing worse when I'm really getting into my favorite ambient track on Mediaplayer and concentrating on writing PHP when all of a sudden a web page in a browser that I'm *NOT* currently looking at goes *BEEEEP*! Hammertime ...
    Last edited by mlse; 08-01-2007 at 10:52 AM.

  • #3
    New Coder
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There will be an option to turn the sound off. As this page is intended to be a notification page there is no reason to be annoyed if a sound is played. It is kind of like being notified of a new e-mail or MSN message. You have the window open while at work, and if there is a new board entry you are notified. This allows you to stay focused on the work as there is no need to check the boards “manually” all the time.

    Back to your answer: I have never worked with embedded streaming media codecs and I’m not quite sure how to solve this problem with such codecs. Do they work in all operating systems and browsers?

  • #4
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    A lot of browsers support them as a downloadable plug-in ... BUT they are not cross-browser! Also, the client must explicitly download the plug-in, and such plugins do represent a security risk (e.g. the Trojan.emcodec).

    Here's a little tutorial I found: http://www.tips-tricks.com/sound.asp

    There's plenty more tutorials out there on the net. Even so, I would question the value of playing a sound ... personally, I have all sounds on my MSN messenger turned off and I have the Win XP start up/shut down tunes turned off. Under Win XP, a minimised or unfocused browser will flash at you from the taskbar if its content changes - you don't have to add anything extra to the webpage to make it do this. If you want extra notification, its very straightfoward to lauch a cross browser pop-up but much harder and less secure to play a cross-browser sound.

  • #5
    New Coder
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mlse View Post
    If you want extra notification, its very straightfoward to lauch a cross browser pop-up but much harder and less secure to play a cross-browser sound.
    How can the updated content be detected and in some way highlighted without using sound? Any suggestions?

  • #6
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    It depends on how you refresh the page content - you could stick in a bit of javascript to generate an alert box. More than that I cannot say without knowing how your site operates - there's many ways to do it, some will be more suitable to your site than others.

    The simplest thing is to allow XP to automatically alert the user via a flashing button on the taskbar, as I've explained.


  •  

    Posting Permissions

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