adding a pause in script

i'm wondering if anyone can help me add a pause in script. i'm trying to delay a function so that an animation has time to complete before a function begins. i'm familiar with setTimeout(), but i believe it is not supported in iHD

Answer this question

adding a pause in script

  • narend

    thank you very much Peter for your knowledge, time, and promptness!

    will you have any time soon to post a sample of picture-in-picture application


  • David Vago

    Correct -- setTimeout is a method provided by a web browser DOM.

    Instead, you use something like:

    var timeout = "00:00:01:00";
    var clock = 1; // Application clock

    function callback()
    {
    // do something here
    }

    var t = createTimer(timecode, clock, function);
    t.autoReset = false;
    t.enabled = true;

    This will call your callback function in 1 second. (Off the top of my head, of course ;-) ).



  • gilagila100

    Please delete this post and start a separate thread (it doesn't fit on the "adding a pause" thread :-) ) -- thanks.

  • fcuifrank

    Thank you Peter, for the PIP sample. I got it to work in the MS Simulator. However, when I attempted to write code for the Toshiba player I had no success. I use the Sonic tool to mux. The playlist generated by the Sonic tool does not reference a "SecondaryAudioVideoClip", instead a "SubVideo" is referenced as part of the "PrimaryAudioVideoClip"

    <PrimaryAudioVideoClip titleTimeBegin="00:00:00:00" src="file:///dvddisc/HVDVD_TS/EVOB001.MAP" titleTimeEnd="00:04:22:24" dataSource="Disc">
    <Video track="1"/>
    <Audio track="1" streamNumber="1"/>
    <SubVideo track="1"/>
    </PrimaryAudioVideoClip>

    When I modify the playlist per your sample, a video controller error message reads on the Toshiba player.

    My questions to you are...

    1. How should the playlist read if the secondary video is muxed into the primary video

    2. Does the script deviate from your sample to toggle the PIP

    Thanks


  • lsanches

    Picture in Picture is actually very simple... https://blogs.msdn.com/ptorr/archive/2006/09/11/750124.aspx



  • adding a pause in script