duration of player

Hi all...

I use class (player) to play the videos in my application...

The problem is when I use (player.getDuration ()) the returned value is - 1

Although the Player object is created with video file has course duration more than-1.

How can I solve this problem.

I've resolved the problem
the player instance should be in preextraites State for can get any information relating to the,.
the realized State do not include information such as the duration.

Tags: BlackBerry Developers

Similar Questions

  • question of the event: event ['data']

    The following function is within a class of the YouTube API that the I found Googling.  It manages the state changes copied this function in my application because I need to listen to and consume some of the same events.  My function is triggered at the right times except this ['data'] event throws the following home runtime error.

    ReferenceError: Error #1069: property not found on flash.events.Event data and there is no default value.

    --

    private void onPlayerStateChange(event:Event):void {}

    / / Event.data contains the parameter of the event, which is the new player State

    var stateIndex:Number = event ['data'];

    {switch (stateIndex)}

    case 0: clearInterval don't (this.updateInterval); break;

    case 1: updateInterval = setInterval (function (): void {})

    currentTime = player.getCurrentTime () * 1000;

    }, 500); break;

    box 3: this.duration = this.player.getDuration () * 1000; break;

    }

    this.dispatchEvent (event);

    }

    --
    Thanks for you help,
    VC

    this.loader.content.addEventListener ("onStateChange", onPlayerStateChange);

    The content is of type DisplayObject, but the runtime is loaded a subclass of

    DisplayObject. This object is dispatching onStateChange, is probably a custom

    event with property inside data. However, the Manager is registered with the

    class generic event that works for the custom event extends to the base event

    class.  Your man is to avoid the compilation error by type table

    event syntax ['data'] instead of an event.data object. I don't know what

    event type is the contents of your shipment but it sholud be a data

    property inside, because the one you use now of course didn't. That's why

    the error only at run time and no compilation.

    C

  • How do adjust you picture in Windows Media Player 11 slide show duration?

    Original title: question of Windows Media Player 11

    How do adjust you picture in Windows Media Player 11 slide show duration? Thanks in advance

    FWIW... If you view your slide show with Windows Picture and Fax Viewer...
    There is a way to adjust the display time of photo.

    The following method will adjust the slideshow 'time by image '.
    for Windows XP - Windows Picture and Fax Viewer.

    Download and install free Windows XP PowerToy "TweakUI".

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Windows XP downloads
    http://Windows.Microsoft.com/en-us/Windows/downloads/Windows-XP
    (Search for TweakUI featured downloads tab)

    When you have downloaded and installed TweakUI... open and
    in the left pane. Expand the Explorer (left click the +) and select (highlight)
    Slide show.

    Change the number to all what you need... then on the left, click apply / OK.
    For example... 5000 = 5 seconds.

  • How to set the duration of viewing on images in Windows Media Player

    How can I disable the automatic in Windows Media Player viewing time when you use images?

    Hello

    According to the description, you wanted to turn off the automatic viewing of images time in Windows Media Player.

    Unfortunately, there is no way to disable or turn off the automatic viewing of images time in Windows Media Player.

    Hope this information helps. If you need help with Windows, just tell me and we will be happy to help you.

  • Toshiba 50L7335DF: problems to play 1080 p mkv files using media player

    Hello

    _The facts_
    I have problems to read files mkv (H264, AC3 5.1) 1080 p via the media player on a USB drive (USB is formatted NTFS)

    The video begins and is OK for a few seconds/minutes, and then it becomes jerky.
    (the subtitles were on)

    I also found that the menus are generally very slow on this TV...

    I also had some problems with subtitles:
    -they were not displayed on a single video (tested OK with VLC on my laptop ubuntu)
    - and on the other, they showed too fast, I want to say it have been synchronized, but they disappeared fast after displayed.
    -one this second video, I got a few square character displayed at the beginning of some lines (maybe an encoding problem, I'll try to understand by myself)
    - And finally, the submarines are truncated at the beginning and at the end of some very long sentences on a single line.

    _So questions: _
    -Is powerful enough to manage movies mkv 1080 p TV?
    N ' matter what official NTFS support soon? (and don't tell me to FAT32... I know that the limitation of 4 GB, which is sad on 1080 p HD mkv...)
    -No recommendation for the encoding format presentations?
    -How to solve garbled subtitles?
    -There's a subtitle settings (font, size, duration, time)?

    Y at - it an update of the firmware fix fo preparation menus speed or one of these superior facts?

    Thanks ;)

    Post edited by: Pheelti

    > Is - this powerful enough to manage movies mkv 1080 p TV?

    Look in the [User Guide | http://www.toshiba-om.net/LCD/PDF/English/L7335-4050-English.pdf] page 95.
    You will find information on all the supported content.
    The internal Media Player supports MKV files, including the
    * video codec *.
    Video MPEG-1, MPEG - 2 Video, MPEG-4 part 2, H.264 (MPEG-4 AVC)
    and * audio codec *.
    Layer2, MPEG-1/2, MPEG-1/2 Layer 3, Dolby Digital (AC-3), L - PCM, MPEG-2/4 LC - AAC, MPEG-4 HE - AAC

    > Any recommendation regarding the encoding format presentations?
    > How to solve garbled subtitles?
    > is there a subtitle settings (font, size, duration, time)?

    Try to make the subtitles is UTF-8.
    You can use the editor like notepad ++ to choose the option to convert it to UTF-8 format.

    > Y at - it an update of the firmware fix fo preparation menus speed or one of these superior facts?
    To get this information, you must communicate directly with the Toshiba, it is only a community of users to

  • Windows Media Player has stopped playing Internet radio stations

    I was able to listen to an Internet radio station for hours until a couple of weeks.  Then I could not listening than in increments of 30 minutes before he stops.  Now, the maximum duration is 1 minute.  How to solve this?

    Hi Tom,

    You can check if the following is useful.

    Method 1: Register the Wmnetmgr.dll file.

    a. click Start. Click run.

    b. type cmd and press enter.

    c. at the command prompt, type the following command and press ENTER.

    regsvr32 wmnetmgr.dll

    Method 2: Run the following tool Fixit.

    Solve the problems of Windows Media Player video and other media or library

  • Windows Media Player 11 does not show my CD playlist automatically; "Find Album Info" in library works, if...

    Hello and thank you for reading my post.

    I just configured Windows Media Player (WMP) 11 after that he downloaded automatically by Microsoft Update and is surprised that, when I insert a CD purchased in the store in one (1) of my two 2 CD drives, he would recognize that a CD is here and with the right number and durations of his songs, but it would NOT automatically identify the CD and these songs.

    I found that I could get this information by manually entering the library (even if I don't permanently transfer the tracks on my hard drive at all), right-clicking on a tracks is on the air and by selecting Find Album Info... a few steps after that and all is filled in the playback in WMP, but the NEXT CD requires the same steps for ITS information appear here as well.

    Do you have any ideas about this, please?  I think I checked all the right boxes, but would walk by them with you gladly to the case where.

    Thank you very much!

    Sincerely, Bram Weiser

    PS My system is Windows XP Home Edition SP3.  If you need more specific information/settings, please let me know.  Thank you very much!

    I think I'm something...

    bramweiser-do you use IE6?

    Edit:

    -close wmp
    -go to internet explorer6 > tools > options > advanced > http1.1 settings > uncheck 2 boxes below.
    Press ok.
    -now insert your CD/media and that's it!

  • I can't play my DVD on my DVD player. I get a message that says: "disk is incompatible." How to burn a DVD compatible with DVD players?

    Original title: DVD burning

    I successfully burned a DVD of a film I made with moviemaker that I can still play on older versions of Windows, but I can't play my DVD on my DVD player.  I get a message that says: "disk is incompatible."  How to burn a DVD compatible with DVD players?

    Hello Angels3cma,

    Thank you for posting.  It seems that you were doing data DVD discs.  To burn DVDs to be compatible with the DVD player, you will need to make DVD-video disc.  I have listed the steps below to make DVD-video disc in Windows DVD Maker.  These same steps are be typing "How to burn a movie on a DVD" in Help and Support found by pressing the button Start/Orb you Windows desktop.

    Burn a DVD-video disc

    You can create DVDs quickly and easily using Windows DVD creation. You can add videos, photos and audio, make slide shows for your DVD, or add your Windows Movie Maker projects. Once you add files, you can burn your DVD with a single click, or, if you prefer, you can choose from several styles of menu and the slide show options to make your special DVD before you burn, or customize your DVD menus and write the DVD menu text yourself.

    After you create a DVD, you can play the DVD on a DVD player and watch your movies and slide shows on TV. The following steps explain how to use creation of Windows DVD to burn a DVD.

    To open Windows DVD Maker

    • Click Start, click all programs, and then click Windows DVD creation.

      Note

      • You can also open Windows DVD Maker by inserting a DVD recordable or rewritable Virgin in your DVD burner. When the AutoPlay dialog appears automatically, click on burn a DVD video disc using Windows DVD creation.

    To add and mix and match the elements on a DVD

    1. On sharing your memories on a DVD page, click Choose photos and videos.

    2. Do one of the following on the Add pictures and video to the DVD page:

      • Click Add items. Find and select the video files, photos, and files in project Windows Movie Maker that you want to add to your DVD, and then click Add.

      • Click file and then click Open project file. Find the folder that contains a project file creation of Windows DVD that you want to use for your DVD, click the project for creating Windows DVD file, and then click Open.

        You can also click Add items to add additional items to the DVD after opening a Windows DVD project file.

    3. To arrange items and specify the order in which the different items will play from the DVD, click on the video, photo or slide show that you want to move, then click on go up or down. You can also move items by dragging upwards or downwards in the list.

    4. To remove an item from the DVD, select the item you want to remove, and then click on remove items.

    Choose a DVD burner and enter a DVD title

    1. If you have more than one DVD burner installed on your computer, on the add pictures and video to the DVD page, select the DVD burner that you want to use from the DVD burner list.

    2. If you want to set different options for your DVD, click Options. For more information about the different options you can specify when burning a DVD, see Change DVD-video settings.

    3. Click the disc title box, and then type a title for the DVD.

    To change the text of a menu for your DVD

    1. Once you have added all of your files and chosen the burner and title, click Next.

    2. To customize the text for the DVD menu, click Menu text, and then do one or more of the following:

    • Click on the police box and then select the font for the text of the menu.

    • Click the font color, bold or italic buttons to select the font color and formatting.

    • In the disc title box, type the title that you want to use for your DVD.

    • In the Play button box, type a label for the button that plays your DVD.

    • In the scenes button box, type a label for the button that displays the different scenes on the DVD.

    • In the area of the button notes, type a label for the button that shows all the notes you enter for the DVD.

    • In the comments box, type any notes that you want to appear on your DVD.

      Notes button and Notes page only appear on the DVD if you include information in these fields.

    • Click on the text to change.

    Tip

    • You can see a static preview of your settings in the preview to the right of the display pane. Alternatively, to see how the menu text will display when you burn your DVD, click Preview.

    To customize the menu for your DVD style

    1. To customize the style of menu for your DVD, click one of the styles of DVD menu along the right side of the screen, or click the Customize menu, and then do one or more of the following:

      • Click on the police box and select a font.

      • Click the font color, bold or italic buttons to select the font color and formatting.

      • If you have chosen a style of menu with the two in the foreground and background video options, near foreground video, click Browse, locate the video that you want to appear in the foreground and then click Open.

      • To have a picture or video appear as background for the main menu of the DVD, near background video, click Browse, locate the video that you want to appear in the background, and then click Open.

      • To add a digital media audio file to play as background music, while the menu for your DVD, near audio menu, click Browse, locate the audio file you want to use, and then click Open.

      • Click the scenes button styles box, and then select the shape of the buttons scenes on your DVD.

      • If you want to see the menu as it will appear when you play your DVD, click Preview.

    2. If you want to save the DVD menu custom settings as a new DVD menu style, click Save as new style. In the name of Style name box, type a name for the custom menu style, and then click OK. You can then choose to use this DVD menu style custom for the current DVD and for other DVDs you create using Windows DVD creation.

    3. If you have not saved the style as a new style, click Change Style to save the changes you made for this DVD and to return to the previous page.

    Choose a slide show on the DVD settings

    1. To set the settings of the picture for the slide show on your DVD, click slide show.

    2. On the change your slide show settings page, do one or more of the following:

      • Click Add music, locate the music files you want to add, and then click Open.

      • Depending on the length and the slide show's settings, you can add additional audio files. To do this, repeat the previous step.

      • If you added more than one audio file and you want to change the order in which the music files play in the slide show, click an audio file that you want to move and then click on move up or move down.

      • To remove an audio file in the list, in the music for slide show list, select the audio file, and then click on remove.

      • To change the length of the slide show automatically so that it corresponds to the duration of the music that you have added, select the Change slide show length to match music length check box.

  • To specify the duration for each picture to display in the slide show, select the duration (in seconds) in the length of the picture box.

  • To choose the kind of transitions to use between pictures, select a transition type in the Transition area.

  • To add effects, Pan and zoom to the pictures you include in your slide show, click on use the Pan and zoom for images effects.

  • Click Change slide show to save the changes you made and to go to the previous page.

  • To burn your DVD

    1. When you have finished adding files and customize your DVD menus, click on burn.

    2. After the DVD disc burned successfully, you can do one or more of the following operations on your disc is ready page:

      • To make another copy of the current DVD, remove the completed DVD, insert a new recordable DVD, and then click on create another copy of this disc.

      • To finish creating Windows DVD, click Close.

    Please let me know if this helps you to Zack
    Engineer Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Windows Media Player - change the columns that appear under 'Now Playing'

    I would like to change the columns displayed in the views now play and Windows Media Player play list.  The factory default is to show only the fields title and length.  It wouldn't be that big a deal this is something fairly simple to access the page layout options, hit choose columns and select the check boxes for the columns I want to show... but the title and duration are the only fields that it allows me to select from.  He still refuses to allow me to select anything else.  I know that there is a way to display more information, but for the life of me I don't remember how to do so that he can do.  Help?

    Hey,.

    I've recreated the scenario on my Windows Media Player. It shows all the info like length, side, title, album, artist to contribute. Appoint you.

    Scan SFC should be your friend.

    http://support.Microsoft.com/kb/929833/en-us

  • can not fast before video in the windows media player 11 in windows Vista Home Basic

    When I play video which is part of the shared folder and I play windows media player directly the duration of the video shows 00:00 and everytime I try to fast forward it back at the beginning.  If I play the same video, but instead, I directly in the file; the duration of the video appears and I am able to fast-forward.  I never had this problem before.

    Hi Jay,.

    1. How can you play the videos located in the shared folder directly in Windows Media Player?
    2 have you made changes to your computer recently?
    3. What is the format of the file that you are playing?
    4 are you facing this problem with any video file in particular?
    5 are you having this problem with all of the audio files?

    I suggest you to follow the steps and check if it helps.

    Run Microsoft Fix - it by following the link and check if it helps.
    Solve the problems of Windows Media Player video and other media or library

  • How to extend the duration of sleep

    There are times when I want to use my tablet as a music player.  However, the sleep function allows only a 30-minute delay.  How to extend the duration of sleep?  My tablet is:

    HP7

    Andoid version - 4.1.2

    software version-P702T_V01_24_130919

    hardware version - PVT

    IFWI version - 06.09

    Kernel version + 3.0.34

    You need to enable developer mode. There is an option in the developer options , called "stay awake" otherwise, 30 minutes is available for you to choose for sleep to occur in the normal options available in configurations for as long. Don't forget to remove the tick in the box stay awake when you are finished listening to music or your slate will run battery pretty quickly, especially in performance mode to maximize the opportunities for energy savings.

    How to enable developer mode

    In settings, click tablet PC. Find the Build number. Tap it seven times. (yes I know, it's a bit like ' he is no place like home "a well-known film ) Developer mode is now enabled, and you will see a new section on the left called options of developer. Be careful with the options. Use only the options you really need.

  • I get request to update my Flash Player from Adobe. What is c? Where to find info on how to use it?

    I don't really know how to use this thing, I'm seriously "physically challenged and a slow-learner." and my computer repair man keeps changing computers about me.  (In this I am not sure that it helps me.  Once I have to get used to some programs, there are 'new '.   His "real confusion.  For example, I got a real easy to use-address book that had all my personal and business addresses and telephone #s in there.  The computer got a 'blue screen' several times, so he came and changed my "Dell XPS" computer professional with a 'new' (a ' Dell 7 Ultimate' it was 'better'.    If I could afford it, I buy a new one and start over) so I rarely know 'where' I am, or what to do when I'm 'where I am.  With a full-time job and a serious hobby of computer repair, it doesn't have the time to help me with "operational" issues This put an unfair burden on anyone trying to help me, but I HAD TO GET HELP - SOMEWHERE, so if I'm not a gene with what will be long-term issues (because I don't know much about the computer operations), can I impose to ask what might be the basic questions?  Of course, they cannot be "basic", but what I know.     I read "... for Dummies" books, but they did not answer my questions.  I'll try to be brief, but it's not my nature.          So, let's go...

    Sometimes I get request to "update my Adobe Flash Player."  I have looked under Start programs and everything I find is "Adobe Flash Player";  I do not use reader because I do not know how, or its purpose.  But I feel like I'm missing out on thing, why would he says in the 1st place?  (I don't want to watch videos, and somewhere, I think I remember it may have something to do with it.  If so, I peut have a NEED for him.  And if so, where can I find information on how to use it.  Once again, if so, I also NEED the Flash Player?

    Original title: * e-mail address is removed from the privacy *.

    Flash Player is used by some web sites to improve how their web page or pages are displayed. If you go on a site that uses Adobe Flash and Flash Player is not installed on your computer, you will see a request to install Flash Player. When Flash Player is installed, then you can never know its duration as its transparent you when loading a web page.

    In your case and on my computer I installed Flash Player, and for this purpose, I see the same update request that you see. It is best to install the update to the latest version of bugs or security risks that may currently exist in the old version install on your PC.

    J W Stuart: http://www.pagestart.com

  • DLNA server is no longer considered by my Sony Blu - Ray player

    My Sony BDP-S580 had been able to play music and videos to my PC during my first installation of Windows 8 and Media Player. The player can see is no longer the DLNA server even if she can see that on my Windows 7 laptop. I have two OTP-S580s something has changed on my PC. My Windows 7 laptop can access the Windows 8 DLNA server. Any help on this issue would be appreciated.

    Monday, December 2, 2013 14:12 + 0000, straightener wrote:
     
    | I believe that Sony has been kept to a IP address that was flawed.
     
     
    If you have a router that supports addressing IP reserved for DHCP clients, you
    might want to try it to make sure that your devices you always get the
    same IP address. Some routers also allow you to set the duration of the lease '' never. ''
    Expires.
     
     
     
    __________________________________________________________________________________________________
    Barb
     
    MVP Windows Entertainment and connected home
     
     
    Connected world Blog Reader Windows 8 App Barb-
     
     
    Windows and Surface drive Windows 8 App community
     
     
     
    Please mark as answer if that answers your question
     
     
     
  • What can I do? Need windows 10 pro N Media Player, where I can get it.

    Could not load the Pro Taste 2015.3 and apears a message that I need to install Media Player because the file wmvcore.dll is missing. I need help.

    Duration reinstall may help https://www.microsoft.com/en-in/download/details.aspx?id=48145

  • Duration of media

    Hello
    I have a question about the use of the Media.getDuration () function. I couldn't find a way to get the duration of media file and return.
    I know that the method is asynchronous, so I've implemented a timeline which adds stunted.
    If I want to just display the result using System.out.println)
    The function is:

    public static double seconds = 0;

    public static double get_PlayTime (String FileURL)
    {
    final music media = new Media (FileURL);
    final MediaPlayer mp = new MediaPlayer (music);
    seconds = 0;
    Timeline delaytimer = new chronology (new KeyFrame (Duration.millis (50), new EventHandler < ActionEvent > ()))
    {
    @Override
    public void handle (ActionEvent event)
    {
    seconds = mp.getTotalDuration () .toSeconds ();
    seconds = music.getDuration () .toSeconds ();
    System.out.println ("duration of the music:" + music.getDuration ());
    System.out.println ("seconds:" + seconds);
    System.out.println ("metadata:" + music.getMetadata ());
    }
    }));
    delaytimer.setCycleCount (1);
    delaytimer. Play();
    return seconds;
    }

    System.out.println works fine, but of course my secons back returns 0 is returned in way before the beginning of the timeline.
    Please help me make my function to return the right amout of seconds. Is there a way to delay the return statement?
    I do not use this function in my playerclass.

    Thanks for your help.

    Published by: 972780 on 22.11.2012 22:36

    If I understand correctly, you must attach the media for a MediaPlayer object so that the duration should be calculated. As it is, there is no media player, so the term is never calculated, the ChangeListener is never called and the CountDownLatch cannot be switched on.

    Add the line

    new MediaPlayer(media);
    

    After

    final Media media = new Media(fileUrl);
    

Maybe you are looking for

  • My static ip keeps changing, how can I avoid this happening?

    Recently, I noticed that whenever I put my static assignment a static ip address via the network and sharing Center for a change. DNS remains the same, but changing the address of subnet and gateway. This change prevents me from online games and give

  • Running itunes with Vista 64-bit

    I'm in the same boat using Itunes with Vista 64 bit. Dell said many things causing Vista crash. I run the gamit on Itunes last year. So I removed all the itunes, Hello, quicktime to computer. But I have 2 guys with iphones who'd really like to be abl

  • Do the staff client Windows phone to report a computer crash?

    Received a call at around 23:00 on a nite Sunday from someone saying they were Windows.  He said that my computer was sending a large number of signals to them that Windows had infected files and that it would probably crash.  I was suspicious of the

  • Windows 8 boot camp update

    Here's my situation. Running a MacBook Pro on 10.9 (developer preview). I have a Win 7 basis which were obtained legally, but I don't have a key to it. I just bought Win 8 upgrade, but had removed my windows partition on my MacBook Pro. I'm looking f

  • Text looks terrible in Acrobat MS Windows 10

    I recently installed Creative cloud including Acrobat DC on Windows 10. When I view a PDF file on the screen, the text looks terrible. It is pixelated and one alias. Text seems also thinner than it should be. Meanwhile, the borders are pronounced sli