#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    How to go to the next page after sound file completes


    I have a website with some text on it. And I want to automatically play a sound file that reads the text for the visitor. And then after the sound file is completed, I'd like to automatically go to the next page and start the sound file for that page. I'd also like to disable the sound and automatic page change when desired. How would I do that. Is this something I can easily do with PHP?

    I do appreciate your help on this. Thank you.

    friend
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    This is a Javascript thing, not a PHP thing.

    Can you do HTML 5?
  4. #3
  5. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,110
    Rep Power
    119
    This is a good tutorial; to help you do what your wanting to do: HTML5 Audio The State of Play | HTML5 Doctor.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Can I also get the text to slowly scrol up the screen as the sound file plays? Can I get a pause or stop as well as a play button?
  8. #5
  9. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,110
    Rep Power
    119
    Originally Posted by friend2me
    Can I also get the text to slowly scrol up the screen as the sound file plays?
    You could create a scrolling panel on each page and display closed caption text, sort of an audio script translation; in each page. You also might want to take a look, at this tutorial: Getting started with the HTML5 track element. If your wanting to display a more advanced CC, then you might to need to move away from HTML5 and move toward Flash & ActionScript.

    Originally Posted by friend2me
    Can I get a pause or stop as well as a play button?
    Yes, just look at the tutorial I posted for you and you will see the events, that are associated with the HTML5 audio element.
    Last edited by web_loone08; July 4th, 2013 at 10:03 PM. Reason: Introduced The Idea of The "Track" Element for Closed Caption
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Thanks, but I'm new to website development. And I'm trying to figure out the easiest path to get there.

    I think I need more interaction between a sound file and control of the web browser. I'm not sure how to do this, javascript, php, HTML5, flash, etc.

    I'd like the sound file to tell the browser where to scroll to on the webpage, and visa versa. if the sound file is here, then the browser will be in this position in the scroll bar, etc. If the user scrolls here the sound file will pick up the sound there, etc. Or they could turn this function on and off as desired.

    I'm trying to turn the browser into a automated presentation to assist the viewer with reading the site. I don't know if the technology exist to that extent yet. I don't know if that would be a client side or a server side script. But I think this would be a valuable application for many sites. Any help would be appreciated. Thanks
  12. #7
  13. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,110
    Rep Power
    119
    Originally Posted by friend2me
    I'm trying to turn the browser into a automated presentation to assist the viewer with reading the site. I don't know if the technology exist to that extent yet. I don't know if that would be a client side or a server side script. But I think this would be a valuable application for many sites.
    There's already software; known as OCR (Optical Character Recognition) or screen readers, which are commonly used by the seeing impaired, but if your wanting your own version of "closed caption" text; what I was telling you about..., would work best.

    Originally Posted by friend2me
    I'd like the sound file to tell the browser where to scroll to on the webpage, and visa versa. if the sound file is here, then the browser will be in this position in the scroll bar, etc. If the user scrolls here the sound file will pick up the sound there, etc. Or they could turn this function on and off as desired.
    Kind of lost, with that; not sure exactly what your trying to do. Other then... to tell you; that you can control the: sound, start/play/stop and etc., which is in the tutorial I provided you.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by web_loone08
    There's already software; known as OCR (Optical Character Recognition) or screen readers, which are commonly used by the seeing impaired, but if your wanting your own version of "closed caption" text; what I was telling you about..., would work best.
    I don't think an OCR would work because there would be text on the screen that I would not want to be read, such as references, or headers or footers, etc.

    Originally Posted by web_loone08
    Kind of lost, with that; not sure exactly what your trying to do. Other then... to tell you; that you can control the: sound, start/play/stop and etc., which is in the tutorial I provided you.
    I thought this was kind of obvious. But let me try again. It seems the only way to coordinate what someone is seeing on the screen of their web browser and what they are hearing from a sound file, is to have the sound file have embedded instructions to control the web browser. If the sound file could control the browser, then it can control what the user is seeing as the sound file plays a voice reading the text. Then the embedded code in the sound file can instruct the browser to go to the next page and start the embedded code of the sound file for the next page.

    I've seen something like this on Youtube.com, where after the video finishes playing the browser jumps to the next video in a list. And I've also seen hyperlinks in video to click on authors websites, etc.

    Is there such a thing as embedded code in media files or other interaction between media files and web browsers? Is there ANY automated scripted control of where the browser is scrolled to or which hyperlink to follow next? For example, can script be coded to pause a sound file for a second while it issues commands to scroll to a certain place and then resume playing the sound?
  16. #9
  17. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,110
    Rep Power
    119
    Originally Posted by friend2me
    I don't think an OCR would work because there would be text on the screen that I would not want to be read, such as references, or headers or footers, etc.
    That's why we define an alternate CSS style, that falls under CSS Reader Media

    Originally Posted by friend2me
    I thought this was kind of obvious. But let me try again. It seems the only way to coordinate what someone is seeing on the screen of their web browser and what they are hearing from a sound file, is to have the sound file have embedded instructions to control the web browser. If the sound file could control the browser, then it can control what the user is seeing as the sound file plays a voice reading the text. Then the embedded code in the sound file can instruct the browser to go to the next page and start the embedded code of the sound file for the next page.

    I've seen something like this on Youtube.com, where after the video finishes playing the browser jumps to the next video in a list. And I've also seen hyperlinks in video to click on authors websites, etc.

    Is there such a thing as embedded code in media files or other interaction between media files and web browsers? Is there ANY automated scripted control of where the browser is scrolled to or which hyperlink to follow next? For example, can script be coded to pause a sound file for a second while it issues commands to scroll to a certain place and then resume playing the sound?
    For..., what your looking for... do an online search for "html5 video sync content". In those search results..., you will see several examples; of how to use the audio events (as was outlined in the tutorial I posted for you); to manipulate an html element's contents and a browser's actions; based on eventlistners; within the DOM.

    Originally Posted by friend2me
    Thanks, but I'm new to website development. And I'm trying to figure out the easiest path to get there.
    Hate to tell ya, but your getting ready to dive in head first into HTML5, JavaScript, HTML5 APIs and CSS... welcome to the future of what your trying to achieve.

    And.. just as a side note..., I would not say, what your trying to achieve is for beginners of web development; but, that's just my opinion and you can do what your wanting to do... you just got to make an effort to understand the material (like anything else you would try to learn) - good luck.
    Last edited by web_loone08; July 12th, 2013 at 11:31 PM.

IMN logo majestic logo threadwatch logo seochat tools logo