Autoplay Video Start at Specified Point

Hi, I'm hoping someone can assist me in making a change to my Actions. Basically the code below has been designed so that a video starts at 52 seconds (rather than the beginning) when you press play. It works good right now, starts where it's supposed to, but I want to change the code so that it autoplays the video starting at 52 seconds. The problem with this though, is that when I try and set it for autoplay, the video starts at the beginning and doesn't wait for it to load to 52 seconds before it autoplays. Any input on the coding? I need it just so that the autoplay doesn't kick in until the video is loaded to the 52 second point. Thank you in advance! Beyond appreciated!
import fl.video.MetadataEvent;
import fl.video.VideoProgressEvent;
import fl.video.*;
my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, rewind);
function rewind(eventObject:VideoEvent):void {
    my_FLVPlybk.seek(52);
    my_FLVPlybk.play();
var fp:FLVPlayback = my_FLVPlybk;
fp.addEventListener(VideoProgressEvent.PROGRESS, videoProgressHandler, false, 0, true);
fp.addEventListener(MetadataEvent.METADATA_RECEIVED, metaDataHandler, false, 0, true);
fp.autoPlay = true;
var startSeekTime:Number = 52;
var videoDuration:Number;
var videoSeeked:Boolean = false;
function metaDataHandler(event:MetadataEvent):void {
     if(event.info.duration != null){
          videoDuration =event.info.duration;
function videoProgressHandler(event:VideoProgressEvent):void {
     var fp:FLVPlayback = event.currentTarget as FLVPlayback;
     var bytesLoaded:Number = event.bytesLoaded;
     var bytesTotal:Number = event.bytesTotal;
     if( !isNaN(videoDuration)){
          if( (bytesLoaded/bytesTotal) >= ( (startSeekTime+4)/videoDuration) && !videoSeeked ){
               videoSeeked = true;
               fp.seek(startSeekTime);

use:
import fl.video.MetadataEvent;
import fl.video.VideoProgressEvent;
import fl.video.*;
my_FLVPlybk.addEventListener(VideoEvent.COMPLETE, rewind);
function rewind(eventObject:VideoEvent):void {
    my_FLVPlybk.seek(52);
    my_FLVPlybk.play();
var fp:FLVPlayback = my_FLVPlybk;
fp.addEventListener(VideoProgressEvent.PROGRESS, videoProgressHandler, false, 0, true);
fp.addEventListener(MetadataEvent.METADATA_RECEIVED, metaDataHandler, false, 0, true);
fp.autoPlay = false;
var startSeekTime:Number = 52;
var videoDuration:Number;
var videoSeeked:Boolean = false;
function metaDataHandler(event:MetadataEvent):void {
     if(event.info.duration != null){
          videoDuration =event.info.duration;
function videoProgressHandler(event:VideoProgressEvent):void {
     var fp:FLVPlayback = event.currentTarget as FLVPlayback;
     var bytesLoaded:Number = event.bytesLoaded;
     var bytesTotal:Number = event.bytesTotal;
     if( !isNaN(videoDuration)){
          if( (bytesLoaded/bytesTotal) >= ( (startSeekTime+4)/videoDuration) && !videoSeeked ){
               videoSeeked = true;
               fp.seek(startSeekTime);
fp.play();

Similar Messages

  • Reading cue point parameters on video start

    Im trying to create a table of contents to navigate to various points in an .FLV file.  I've encoded the flv with cue points in media encoder. I've also added a parameter to each cue called toc_title with the lable that should represent the time in the video to jump to. It occurred to me though that those parameters might not be available to my flash player until the frame of the cue was reached. I need my toc to be visible when the video starts. First of all, is this entirely the wrong approach? I want to make this video player as dynamic as I can and would like to reuse it for several different videos with different TOCs. Is the parameter data set on cue points available at any time in the video playback or only when the cue is reached?  Thanks, John

    Hi John, You may receive more advice and help on the Flash forum. You can start a thread there or perhaps some threads may already be discussing your concerns.
    http://forums.adobe.com/community/flash/flash_general?view=discussions&start=0
    Hope that helps.
    eidnolb

  • GPRM-based button with Start at Loop Point Troubles

    First of all, I'm running DVD Studio Pro 4.2.1 on OS X 10.4.11
    I'm trying to finish a project where when a video ends, it jumps back to the menu directly to the next button in order. This menu also has a loop point set in order to skip an opening animation. So I wrote the following script to accomplish this:
    1: mov GPRM 0, SPRM 8
    2: div GPRM0, 1024
    3: add GPRM0, 1
    4: jump "menu name"(Loop) [GPRM 0]
    When I simulate the disc, everything works fine. However, a burned disc fails to return to the loop point. It will start on the next button when the highlights appear at the loop point, but the menu will begin from the beginning animation, not at the loop point.
    Is there some conflict between the GPRM based button command and the start at loop point command? I did perform a test with the GPRM based button commands left out and the start at loop point function worked perfectly.
    Edit: The "GPRM 0" at the end of the script shouldn't be a link but in brackets instead... the forum changed it to a link by default.
    Message was edited by: brazzamHD

    Given lines 1, 2 and 3, it is very unlikely that GPRM0 will ever be zero...
    What your lines are saying, roughly, is:
    "find the value of the last button that was pressed on a menu, and reduce it to a simple integer we can work with. Add '1' to the button number and then jump to the loop point on the menu IF the value in GPRM0 is '1'"
    The problem is that it will never be '1' because of line 3. The lowest value it could be is '2' when you keep that line in there.
    Also, you don't specify which GPRM you are evaluating in either version of line 4 - I assume GPRM0, as that is the one you are working with in lines 1, 2 and 3.
    If you want to return to the loop point of a menu depending on the button the user previously selected being the first button then the code is this:
    mov GPRM0, SPRM8
    div GPRM0, 1024
    Jump MenuName (Loop) If (GPRM0 = 1)
    However, you might want to simply start at the loop point of the menu but make sure that the user is on the same button they were on previoulsy, in which case the code would be:
    mov GPRM0, SPRM8
    div GPRM0, 1024
    Jump MenuName (Loop) \[GPRM0\]
    To do this you \must make sure that you have checked the GPRM based button checkbox in the property inspector.
    If you want to go to the next logical button after the one the user was on previoulsy, then you would need to add a '1' to it. The code looks like this:
    mov GPRM0, SPRM8
    div GPRM0, 1024
    add GPRM0, 1
    Jump MenuName (Loop) \[GPRM0\]
    Note that the bracket shapes are important... a GPRM based button jump means that you will go to a button which has a value the same as that in the specified GPRM. The square brackets signify it is this kind of move, and not a simple evaluation of true or false.

  • Ken Burns start and stop points

    In iMovie, when using the Ken Burns effect how can I set the start and stop points to be the same? I don't want to just use "Crop" because my understanding is that using the Ken Burns effect will result in a clearer still photo.

    The renderer that is used when the Ken Burns effect is on does give a clearer still photo when converted to video. On an older version of iMovie I could set the startpoint and then use a key-sequence that was a shortcut to set the endpoint to be the same as the startpoint. I was hoping there was a similar feature with the newer version of iMovie. Then I wouldn't have to adjust the start and stop rectangles for a 100 photos.

  • Video start and media end time stamps get lost

    Premiere Pro CS4  is not keeping the tape's media start and end times as well as the Video In and Out Points.
    It never was a problem with earlier versions but this began the on the very first use of CS4.
    I use these time stamps to keep track of the chronilogical order of the clips.
    Anyone ever had this problem.
    Thanks

    This problem occurs after mini DV tapes have been loaded in.  It has happened with both my older panasonic AG-DVC30 and my newer AG DVX100.
    It is really annoying because I count on using those time stamps to coordinate the addition to the clips into the editor.
    It seems that I've lost some of the time stamps after they have all been loaded in.  Like when I start up Premiere Pro CS4  a second time on the, the next day, I find even more of the time stamps missing, over in the project pane.  I probably should carefully document that to be sure.  Could be significant in the troubleshooting process.

  • Need to show company logo (pdf)when video starts on iMovie, Mac 10.9.4

    My max is 2014 osx version 10.9.4/ Processor 3.2GHz intel core i5/ Memory 8GB 1600 MHz DDR3. I'm working on a video in iMovie and need to put my company logo which i have on a pdf file on the start of my video. When the video starts playing it shows my workers doing there job, i need my logo to appear for about 3 to 4 seconds. I can't find away to do this can any one help?

    Hi
    The big Magician Karsten Schlüter has solved this (I guess)
    See User Tips - or -
    How to create a pointer or a custom title
    And You get an idea of howto get this working.
    Good Luck
    Yours Bengt W

  • Autoplay video within an HTML article?

    As the title says -- I have an HTML article whose code starts a video playing. This works fine in Safari on the Mac, but in the Viewer, it makes me tap to start the video (or start the whole script?).
    Some googling and asking indicates that this may be a limitation imposed by apple, to avoid hijacked web pages. Not sure about that.
    This is the "cover" of the app, and I need it to start by itself, or I'll need to jettison all the HTML functionality and just use it as an autoplay video.
    Has anyone come up against this before? Or is my code just wrong?
    thanks
    David

    Hi
    This might not work for your case bacause it's on the cover. But anyway.
    I was using jqtouch an video. And wanted the video on the next page to autoplay when the transition was over.
    So on the button at page one (to go to page two). I put the code for the video to play on page two.
    <a href="javascript:void(0);" onClick="jQT.goTo('#page2', 'reveal');" ontouchend="document.getElementById('someVideo').play()">
    Then if I have more video on page three I have to stop video on page two before start video on page three.
    <a href="javascript:void(0);" onClick="jQT.goTo('#page3', 'reveal')" ontouchend="document.getElementById('someVideo').pause(), document.getElementById('someVideo2').play()">
    In your case it might work with some kind of loading page before the actual cover? Or try it with an onload? Have not tried that.
    Regards
    Olle

  • Menu-Background Video starts again, when choosing Menubutton

    I've recently changed from WIN Encore CS3 to MAC Encore CS4 and am now facing some Problems...
    My newest challenge: When trying out my menu in preview mode,
    the video which is supposed to play peacefully in the background of the menu starts new - every time i select another menubutton (via keyboard or mouse)the background video starts from the beginning... normally as i know it, it should continue until looping point (which it does, when no control is touched)
    I have no idea - is there another feature in the MAC version i do not know or is it a "new feature" in CS4 which renders my CS3/WIN experience worthless?
    I am thankful for any hint, i'm clueless where to look
    Greeting from Hamburg, Martin

    >a reliable preview helps a lot...
    I agree, but in general, a preview in any DVD authoring software is just a simulation of a DVD player, and not the real thing.
    It is always best authoring policy to burn a rewritable disc and test it in a player. That is the most reliable testing method.

  • Trying to place an image before a video starts

    I have a very preliminary website with some flash and video. It passes the validator. The flash and video work but the video software isn't able to show any of the video until someone presses the play button - it just shows a black box.
    According to the video software provider, their player can't show a preview image. I wonder if it's possible to "overlay" an image with the same div, then have it disappear or move to the background when the play button is clicked.
    Failing that, does anyone know of a similar program which can insert a video easily into Dreamweaver? The one I'm using was cheap and easy but if it can't/won't do what I need it's a waste of time and effort.
    For some reason I can't paste the code...

    I don't think the suggested method (<div> background image) will work with the example Web page video you linked to.... here is why...
    Inside the <div> is code for a special Windows Media Player... (not a very good choice by the way)... meaning that the <div class="videobox"> has content (the video player) which will cover over the background image.... leaving the black box and some controls showing.
    Code also contains an IE conditional statement and nothing in the
    <!--[if !IE]>
    so nothing displays in FF.... nix all that player code and use something else.
    A better route (in my opinion) would be to first choose a better video type than mpeg (better compression and quality per file size)... choose an mp4 for example.
    Now you have a much wider range of player options.
    For example:
    http://flowplayer.org/
    http://www.pickleplayer.com/
    http://www.longtailvideo.com/players
    Any of these players plus an mp4 file would be much better than your current choice. They all support a "poster frame"... or image that displays before the video starts.
    If you need to convert mpeg to mp4, Handbrake does a good job:
    http://handbrake.fr/
    Best wishes,
    Adninjastrator

  • How do I move video clips to specific points on a music track in iMovie?

    I am trying to make a lip synch video and need to move my video clips to specific points on a musci track so that the words are in time with people singing - does anyone know how to do this? At the moment, I only seem able to put the clips in one after the other...

    Hi
    IMovie is Video clip oriented - meaning that Audio can not be put in first and video/photos added later.
    So to do this I use black photos that I fill up the Video with first
    Then Add audio
    Then add Video/photos by Cutaway function or exact replacement (in time).
    This is so much easier in any version of FINALCUT where one can build Audio first then create the video ontop of this.
    Yours Bengt W

  • TS1702 Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a

    Maps program does not work. In standard it only shows a grid. If I ask for a route it shows start and end point and three route boxes but nothing else. It does show directions. If I switch to hybrid it shows to routes but no roads. Background is a blur.

    Do you have a question? This is a user to user help forum. Apple is not here only other users like yourself. You don't report problems to Apple here.
    By the way, it might help if you indicated where you are located.
    To complain to Apple use http://www.apple.com/feedback/ipad.html

  • Why do my audio and video start in sync, then quickly go out of sync?

    I've just installed Windows 8 and also purchased Premiere Elements 12.
    I've also got Windows movie maker.
    When I play my clips in Premiere Elements, they audio and video start of synced, but quickly go out. This doesn't happen with Windows Movie Maker and I had trialed some NCH video editing software also and didn't have that problem.
    can someone tell me what I need to do to get this working right?

    MASMAS
    The first thing that we need to know are the properties of what you are putting on the Timeline. What works in another software does not necessarily work in Premiere Elements. Each program has its own supported formats.
    a. What is the file extension for this file? .MOV or .MP4?
    b. Does the iPad describe it as 1080p or 720p?
    c. If you open Premiere Elements 12 and go to Edit Menu/Project Settings/General, what do you see for Editing Mode, Timebase, Frame Size, and Pixel Aspect Ratio, even if those field appear to be grayed out.
    Two immediate troubleshooting avenues are going to be in the direction of...
    a. Project settings not set up to match the properties of the source from the iPad. Then we would start a new project and set the project setting manually before importing your video. Details for manually setting the project preset are in the following.
    ATR Premiere Elements Troubleshooting: PE11: Accuracy of Automatic Project Preset (New Project Dialog) Setting
    b. The iPad video being recorded with a variable frame rate instead of a constant one...the remedy then would probably be to take your video in a program like HandBrake to change the variable to a constant frame rate. And after that, import the corrected video into the Premiere Elements project which has the correct project preset (preferably set manual to assure the correct result).
    Please see what you can put together in the way of video details, and we will sort this out.
    Thanks.
    ATR

  • First Play at Preview ok, but not working correctly when Video started from DVD

    Hello
    I created a Project with Encore CS5.1. When i test via the "preview" button (disc symbol) everything works fine.
    When i export the Project to a DVD the Video starts directly with the Main Menue although i expect starting with the intro clip. As i said with encore preview everything works fine.
    Has anybody an idea how to solve this issue?
    Thanks in advance
    Rene

    Hi Bill and John
    Thank you for your feedback.
    Attached i'll send you a screen shot of the flow chart and the specs.
    I just created a new project with only the "Vorspann - Trailer" and the Main Menue. All other links are not created yet.
    With the preview everything is ok but if i create an image the video starts directly with the Main Menue.
    Kind regards and thanks again.
    Rene
    With preview ok
    Crate an image or DVD > video starts with direct play of the main menue

  • Split audio from video doesn't split video at the same point ?

    When I split the audio from a video in GarageBand I would like the video to be split at the same point (so that I can insert audio in between without everything getting out of sync).
    Is this possible?
    (I don't want to use iMovie since that turns my 150 MB mov file into a 8 GB file..take ages to import)
    The reason I want to insert audio in between video fragments is that I am creating an audio description of a tv series for a blind friend. I watch the video, pause that, and describe. Then continue.
    If I can split both the video and "audio from video" at the same point and drag those to the right, so there's room to record something in between (then in the end I'll just drag it all so that the parts join up, delete the video and merge the audio. I hope.)
    Thanks in advance!!

    I figured out how to reset the Youtube video upon hiding thanks to Heathrowe's answer and FigFrance's contribution to the thread found here:
    https://forums.adobe.com/message/4979969#4979969
    The secret was adding .empty() to my video container.  Here is my functioning button code:
    Show Video:
    //code to embed youtube into symbol
    var youtube = $("<iframe/>");
    sym.$("video").empty().append(youtube);
    youtube.attr('type', 'text/html');
    youtube.attr('width', '640');
    youtube.attr('height', '360');
    youtube.attr('src', 'https://www.youtube.com/embed/MyFv6UKsW70?rel=0');
    youtube.attr('frameborder', '1');
    youtube.attr('allowfullscreen', '0');
    // Show an element
    sym.$("video").show();
    Hide Video:
    sym.$("video").empty();
    // Hide an element
    sym.$("video").hide();
    Brandon

  • My SD video keeps jumping between the upper and lower frames. So the video starts frame blending and blurring in and out.

    My SD video keeps jumping between the upper and lower frames.  So the video starts frame blending and blurring in and out.  The sequence settings are set to
    Editing Mode: DV NTSC 29.97 frames/second. 
    Pixel Aspect Ration: D1/DV NTSC (0.9091)
    Fileds: Lower Field First
    Display Format: 30fps Non-Drop-Frame Timecode
    720 x480

    What is the source of your video, and exactly what is inside your video?
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30 for screen shot instructions
    Free programs to get file information for PC/Mac http://mediaarea.net/en/MediaInfo/Download

Maybe you are looking for

  • Can't renew contract and upgrade phones 1 1/2 days early?

    Last Saturday I tried to renew my contract and upgrade mine and my wife's phones to the Galaxy S5 at the Tunnel Rd, Asheville NC location. My official contract renewal date for both phones was the following Monday, but due to the nature of my work, a

  • EAR Deplyment Problem : EJBFileGenerationException

    Hi All , I am facing problem while deploying a simple session bean. I am pasting the error message below... I would be obliged if any of you can give a solution for this problem... I donno what exactly is going wrong. Java code seems to be file and t

  • Variable entry screen from BW in webdynpro

    Hi all,     can I use the variable entry screen for a BEx query to access all the user inputted values in a webdynpro application.     I want to launch this screen from within the webdynpro application, and once the user presses "Execute", I want all

  • Ozonic and control parameters ?

    i need help setting up my ozonic and logic. it read's the automation conrtols they comthey come into the enviroment. but it wont let me assig to controls on synths etc. thanks in advance

  • Create person in om

    Hi all, How to create  person in OM?Can Anyone tell me? Regards janhavi