Results 1 to 4 of 4

Thread: How Do I make A Time Based T.V. Show?

  1. #1
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How Do I make A Time Based T.V. Show?

    I Have A local channel and I am Planning to use java to make it perfect.I want to make framed web pageto show on t.v. as the channel shows my desk top on the screen and also the sound playing on my comp.
    What I need is a time based script which runs according to the time on my computer like say its 2 o'clock and I want to play a movie at that time with real player so what script do i use to do so?
    I want something that will automatically play a preset audio or video or swf file at a specific time.
    Thanx in advance

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you already have it worked out how to beam your desktop into millions of homes across our nation or the planet or just a few in your neighborhood, and you are leaving the computer on all the time with the browser showing a local page and you know how to launch a movie onclick on the page, the rest should be rather simple. Polling is the term for the concept you can use. A simple poll for this could be:

    Code:
    <script type="text/javascript">
    function checkTime (hour){
    var now=new Date()
    if (now.getHours()==hour){
    do whatever to launch the movie
    clearInterval(movieTime)
    }
    }
    var movieTime=setInterval("checkTime(14);", 1*1000*60)
    </script>
    14 is 2:00pm in 24hr notation. 1*1000*60 is 1 minute in milliseconds, in this case how often to check to see if the time is right.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question I need Complete Help

    I need A complete script that will automatically play different things at different preset times and I beam across a few in the neighbourhood.
    Plz Give me full ideas as I am really new to scripts I am doing it on t.v. and t.v. in India doesnt allow clicking .
    Last edited by paagle; 12-21-2005 at 04:45 AM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes TV here doesn't allow clicking either, if it isn't WEBtv. However, if you have another page that launches the movie, you can have something like this in the body of the first page:

    HTML Code:
    <a id="movie" href="movie.htm" onclick="window.location.replace(this.href)">Movie</a>
    Then using the script that I already gave you:

    Code:
    <script type="text/javascript">
    function checkTime (hour){
    var now=new Date()
    if (now.getHours()==hour){
    document.getElementById('movie').onclick();
    clearInterval(movieTime)
    }
    }
    var movieTime=setInterval("checkTime(14);", 1*1000*60)
    </script>
    And then for the next movie page, put the code for that on movie.htm. If, on the other hand, it is simply a case of whatever is on your screen is on the TV station, you might want to investigate scheduler programs. There are a number of freeware ones out there. With one of those, you would not need the browser or javascript at all and could launch your programs that show your content directly as well as automatically.

    No Nags is a good international resource for freeware.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •