How to customize video player progress bar?

I want a video progress bar (maybe it is a slider ), which
can be used to show the buffer progress of video, the standard
slider control in Flex has not this function.
How can I customize the silder control?

this is a very basic video player. what we've done here is A
LOT of binding i.e. vp.playheadTime=(vp.totalTime/(100/ctr.value))
after you've figured out what the right math is..which is
already done here, you can just skin it and it'll work fine. i
haven't had the time to update this for a while but there is
definitely room for improvement. hope this helps.
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml"
horizontalAlign="center" verticalAlign="middle"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%" height="100%">
<mx:Script>
<![CDATA[
public function init(path:String):void
vp.source = path;
vp.play();
public function fixIt(what:Number):Number
what.toFixed(2);
return Number(what);
]]>
</mx:Script>
<mx:VideoDisplay autoPlay="false" id="vp"/>
<mx:HSlider minimum="0" maximum="100" width="{vp.width}"
height="29" id="ctr"
value="{fixIt(vp.playheadTime/(vp.totalTime/100))}"
change="vp.playheadTime=(vp.totalTime/(100/ctr.value))"
liveDragging="true"/>
<mx:Label id="duration"
text="{int(vp.playheadTime)}"/>
<mx:HBox>
<mx:Button id="pp" label="Play/Pause"
click="if(!vp.playing){vp.play()}else{vp.pause()}"/>
<mx:Button id="st" label="Stop" click="vp.stop()" />
<mx:Button id="rw" label="Rewind"
click="vp.playheadTime=0" />
</mx:HBox>
</mx:VBox>

Similar Messages

  • How can I add a Progress bar to show the "render to JPG" progress?

    Hi everyone, I have a button which renders my component to
    JPG.
    How can I attach a progress bar to show the progress of the
    rendering?
    <mx:Button label="render" click="renderasJPEG ()"/>
    public function renderasJPEG( ):void
    convertToImage( component001, new JPEGEncoder( 100));
    private function convertToImage( object:IUICompon ent,
    encoder:IImageEncod er):void
    var base64string: String = ImageSnapshot. encodeImageAsBas
    e64(
    ImageSnapshot. captureImage( object, 72, encoder));
    var variables:URLVariab les = new URLVariables( );
    variables.encoded = base64string;
    variables.type = "jpeg";
    var request:URLRequest = new URLRequest(" script_saveasima
    ge.php");
    request.method = "POST";
    request.data = variables;
    navigateToURL( request, "_blank");
    Thanks in advance.

    Hi,
    I would have thrown a prompt to the user in the renderasJpeg
    function and removed it in last line of convertToImage function.
    Isn't this what you want?
    Hope this helps.

  • How can I use a progress bar in objective c mac

    How can I use a progress bar in objective c mac? I have a code that downloads a file and I want to be able to let the progress bar increase by 1. A bit further on the code (to download the file) it needs to increase again. And so on...
    My code
    -(IBAction) downloadButtonPressed:(id)sender;{
        //get the path to the image that we're going to download
        NSURL *url = [NSURL URLWithString:@"https://www.dropbox.com/s/l6o07m48npxknt4/Cluedo.zip?dl=1"];
        //get the path to documents folder where we're going to save our image
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *DocumentsDirectory = [paths objectAtIndex:0];
        NSString *filePath = [DocumentsDirectory stringByAppendingPathComponent:@"Cluedo.zip"];
        //Download the file to memory
        NSData *data = [NSData dataWithContentsOfURL:url];
        NSError *error = nil;
        //Save it on the Documents directory
        [data writeToFile:filePath options:NSDataWritingAtomic error:&error];
        NSFileManager* fm = [NSFileManager defaultManager];
        NSString* zipPath = filePath;
        NSString* targetFolder = @"/Applications"; //this it the parent folder
        //where your zip's content
        //goes to (must exist)
        //create a new empty folder (unzipping will fail if any
        //of the payload files already exist at the target location)
        [fm createDirectoryAtPath:targetFolder withIntermediateDirectories:NO
                       attributes:nil error:NULL];
        //now create a unzip-task
        NSArray *arguments = [NSArray arrayWithObject:zipPath];
        NSTask *unzipTask = [[NSTask alloc] init];
        [unzipTask setLaunchPath:@"/usr/bin/unzip"];
        [unzipTask setCurrentDirectoryPath:targetFolder];
        [unzipTask setArguments:arguments];
        [unzipTask launch];
        //[unzipTask waitUntilExit]; //remove this to start the task concurrently

    Your code really isn't suitable for a progress bar, not a real one anyway. Your code will spend about 99.9% of its time in the method "dataWithContentsOfURL:url". That is not a method you want to use in the real world. It is only for demos or proof of concept exercises. All network operations should be asynchronous. That gives you the ability to gracefully recover when there is a failure and also to do fancy things like display a progress bar and tell the user when the download is complete.
    Once you get the asynchronous download logic working, then you can worry about the progress bar. The first thing you will need is the size of the file. Without that, all you can ever do is an indeterminate progress bar or spinner. If you have the size of the file, then you can keep track of how much of the file you have downloaded and update your progress bar with the percentage complete. Make sure to throttle it to no more than incrementing by 1% at a time. Otherwise, a large file or a file transferred in many small chunks, would waste too much time updating the progress bar for no change.

  • How to download video player stream for ipad?

    How to download video player stream for ipad for free?

    Most such tutorials that I've seen are done as self-contained apps. For instance, the ones from this company:
    http://itunes.apple.com/us/artist/appdesigner.com-inc./id361068165
    All such apps are delivered via the iTunes Store, which binds an app to the purchaser's iTunes Store account so the app can't be shared with anyone else. You can learn more about developing and selling apps for iOS here:
    https://developer.apple.com/programs/ios/
    Regards.

  • Can't Render Video Hangs on the Initializing Video Export Progress bar

    When rendering a video I never get past the Initializing Video Export Progress bar.
    Running windows 8 64bit, Photoshop CC.
    I have Windows CS4, Lightroom 4, LIghtroom 5 and Premier Elements installed. I have no problem exporting video from lightroom or Premier Elements

    I am trying to process a move clip of various types. I don’t even get to the dialogue that presents the parameter entry. I’ve tried .mp4,mts,3gp,f4v & m2t. I don't even have any changes applied to the clip.

  • Disable or Customize initial Loading Progress Bar

    Is there a way to disable or customize the first progress bar
    that is displayed while the browser is downloading the MXML
    Application SWF?

    Hey Michael,
    Check out this thread on changing the loader:
    http://forums.adobe.com/message/2448040#2448040
    Short answer is, not in Flash Catalyst right now.
    But you can change it in Flash Builder with a little coding.
    Hope this helps,
    Tara

  • How to embed video player in iPhone application?

    Hello Everybody,
    I want to embed video player in my application. I have one sample code provided by the iPhone developer documentation. But it is not running properly , it is just showing one rounded progress indicator and it is rotating n rotating and never coming to an end. Can any one here , tell me how do I proceed to embed video player in my application?
    Any information regarding this is highly appreciable.
    Thanks,
    Pandit Pakhurde

    Hi Roger,
    Actually, Code is running fine and not giving any error. When I am clicking on "Play Movie" button then iPhone is getting flipped with one window having black screen and round progress indicator is rotating in middle of the screen. But no picture. I also debug the code , all the necessory paths of the video files are same. I think there are two possibilities in this issue, either video is not getting loaded properly or iPhone simulator is not providing the necessary requirement to run video file.
    Is there anything I am missing then please let me know.
    Thanks,
    Pandit Pakhurde

  • Trying to add audio player progress bar

    Hi
    I'd like to add a progress bar to my flash audio player.
    Right now you press a button, a certain sound loads and then plays.
    Here's part of the code:
    function playSong(e:Event):void{
        if (my_channel) {
            my_channel.stop();
        var myURL = ("mysong.mp3");
        my_sound = new Sound();
        my_sound.load(new URLRequest(myURL));
        my_channel = my_sound.play();
    In order to build a progress bar I wanted to find out the length or duration of the sound but I keep getting error messages or 0s in return
    trace (my_sound.duration);  
    tells me that duration is an undefined property
    trace (my_sound.length);
    trace (my_sound.position);
    trace (my_sound.bytesTotal);
    trace (my_sound.bytesLoaded);
    all give me a 0 in return
    Any idea why? Why can't I access the properties of my Sound?
    I'd also be very thankful for any other suggestions on how to add a progress bar. I searched a number of websites, but most samples are AS2 code...
    Thanks
    Julie

    Duh! Once again I thought my comuter is faster than it actually is ;-)
    Thanks :-)

  • How to play swf with progress bar?

    I have a SWF file that was generate NOT from Flash. Is there
    a player that can allow me to play it full screen with basic
    controls at the bottom? Controls that I can choose play, stop,
    pause, fast fwd, rewind and a progression bar. Thanks!
    Another question is how can I convert swf to exe with the
    flash projector embedded with the exe, keep in mind that this is
    not originally from Flash, it's from a third party program that
    can't export to flash projector.
    Thanks.
    Glenn

    Hi Patrick,
    Since this issue is mainly related to a control which belongs to third-party, I would recommend you consider posting this issue on the same site like the following thread because issues related to third-party are not supported.
    https://forums.adobe.com/thread/717505?tstart=0
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can i Create a PROGRESSIVE BAR   while process of a procedure is going

    hi,
    I have a push button in my form that runs the procedure .the process will approx 15 minutes. while processing is started, i want to display PROGRESSIVE BAR
    until process complete and exits automatically after process . please suggest me how to create the same, is it possible..
    please send me solution as soon as possible please
    thanks in advance
    prasanth

    The forms demos contains a progress bar bean which you can use if web deployed.
    Regards
    Grant Ronald
    Forms Product Management

  • How to make use of *progress bar*?

    I have a progress bar requirement in my swings project,
    i.e on clicking a button, some task should be executed and in parallel to this
    progress should run on progress bar in the same frame and soon after this task
    gets completed the progress on progress bar should come to an end.
    How can i do this in swings?
    could any one help me out from this?

    How to use progress bar
    http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html
    If you want an example scroll down to the bottom of the page and download the examples.

  • How do I programmatically change progress bar limit?

    Hello all.  I have a custom control and one of the indicators is a progress bar.  The bar is used to show the position of a life test fixture as the fixture moves up and down.  I would like to have the max limit of the bar to be set by the user.  The user enters a number and the bar maximum will be that number.  That way the bar is more indicative of actual fixture movement.  How would I programatically do this?
    I read about using the Range property, but I can't seem to access it.  Is this because the progress bar is part of the cluster?  Would I need to separate the progress bar from the cluster, get the Range property set up, then put the bar back into the cluster?
    My problem here is that since this is a custom control, it is set as a typedef, with my vi using 12 copies of it.  So if I can't get the typedef to accomplish what I want, I guess I'll have to break the link between the typedef and the vi, go into the vi, and edit all 12 custom controls to do it. 

    Hi Dhouston
    please find the ZIP file attached. somehow i can't upload a VI
    Eventhough the cluster is a typdef control, you can still right click the slide inside the cluster and create a property node.
    hope this helps
    RENN
    Kudos always welcome for helpful posts
    Attachments:
    setScaleRangeProgramatically_V2.zip ‏10 KB

  • How to increase the system progress bar height?

    Hi
    I just want to increase the height of windows system progress bar and it is not able to customize. It is having the option to adjust the width and not the height. For example the height of system progress bar used in labview installer is large compared to control which is in labview control palette. 
    I want the progress bar as in the below figure
    Thanks & Regards
      Samuel J
      System Engineer 
      Captronic Systems
      Bangalore
    Message Edited by Support on 07-15-2009 12:51 PM
    Solved!
    Go to Solution.

    Hi Mike
    Thanks for your reply
    I know that I can change height progress bar which is in modern palette. But if i customize it doesn't look like the system progress bar. 
    So what I have to do to make the progress bar similar to system progress bar which is in the image that I send you. If you have the customized control please send it to me.
    Thanks & Regards
    Sam

  • How to have a download progress bar on an applet?

    I wonder if it is possible to have a download progress bar on an applet, which detects the download progress of JPG-pictures that needs to be loaded by the applet before it starts. If so, how can I implement this?

    Use a JProgressBar to display the progress
    For large jpegs use ?HttpURLConnection? to get the file size and file data.
    Increment the progress bar according to file data downloaded / file size.
    For multiple jpegs, you just do the calculation based on both file size, files downloaded.

  • How can i add a progress bar to my UIwebview

    i have a page in my application where i have a UIWebview what i want to do is have a progress bar somewhere on the screen to indicate the loading status on the page.

    Go to your xib file or storyboard file, then you should see Progress view in the objects.

Maybe you are looking for