Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User vanevery's Avatar
    Join Date
    May 2005
    Location
    New York
    Posts
    5
    Hi All,

    I need to use the file:// syntax for an MMAPI video playback application (so that I can get FramePositioningControl). Unfortunately, I can not figure out the syntax to load a video file from the JAR file using it..

    Any advice?

    I have tried:

    mPlayer = Manager.createPlayer("file://videofile.3gp");
    mPlayer = Manager.createPlayer("file:///videofile.3gp");
    mPlayer = Manager.createPlayer("/videofile.3gp");
    mPlayer = Manager.createPlayer("videofile.3gp");

    Thanks

  2. #2
    Nokia Developer Champion honest_success's Avatar
    Join Date
    Sep 2007
    Posts
    915
    Here i am providing you both synatx.

    public static Player createPlayer(String locator);//File Locaor as your requirement



    public static Player createPlayer(InputStream stream, String type);


    the following is one example for it.

    InputStream in = getClass().getResourceAsStream("/fish.mpg");
    mPlayer = Manager.createPlayer(in, "video/mpeg");a

  3. #3
    Registered User vanevery's Avatar
    Join Date
    May 2005
    Location
    New York
    Posts
    5
    The getResourceAsStream won't work for me as I need to use a "file://" locator to get the FramePositioningControl to work.

    I am looking for the specific locator syntax for "file://" for getting a file out of a JAR

    Should be something like: Manager.createPlayer("file://blah.3gp");

  4. #4
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Here is a link to some examples
    http://www.forum.nokia.com/document/...7B63C2E59.html

    Hartti

  5. #5
    Registered User vanevery's Avatar
    Join Date
    May 2005
    Location
    New York
    Posts
    5
    Thanks..

    Guess I was unclear previously. I need to get access to a file that is bundled with the Jar as a resource. in other words, inside the jar.

    After digging for quite a while, it seems there isn't a means to get at a resource file in a Jar with the file:// locator syntax..

    I either have to use an existing file on the file system or utilize getResourceAsStream which prevents me from using some of the functionality I need in the MMAPI.

  6. #6
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    Yep, getResourceAsStream is your only possibility here (getting the file from JAR resources).

    Hartti

Similar Threads

  1. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Python
    Replies: 35
    Last Post: 2008-01-17, 09:12
  2. Contacts fields order??
    By timatima in forum Symbian C++
    Replies: 1
    Last Post: 2007-06-08, 13:51
  3. Creating and installing SIS file...
    By Himanshu_Joshi in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2007-04-12, 17:36
  4. Series 60 SDK Appwizard on windows xp
    By moonjoor in forum Symbian Tools & SDKs
    Replies: 15
    Last Post: 2003-12-24, 10:22
  5. Replies: 0
    Last Post: 2002-11-19, 08:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved