×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Controls for Flv Video player

    Hi,
    I am developing application for Nokia N97 mini in which i have called an flv video using the net stream method which is working fine now i need to give controls like time line rewind forward play pause controls to the user if possible even full screen. Is there an ready component available for the same or i have to do it through code. Please help

    FYI

    var myConnection:NetConnection = new NetConnection();
    myConnection.connect( null );
    var myStream:NetStream = new NetStream( myConnection );
    videoDisplay.attachVideo( myStream);
    myStream.play("Videos/Theory.flv");


    btnClose.onRelease = function ()
    {
    fscommand2( "Quit" );
    }

    btnHome.onRelease = function ()
    {
    removeMovieClip(_root.Main.Theory);
    _root.Main.attachMovie( "Home", "Home", this.getNextHighestDepth());
    }

    Above is the code i am using to invoke the flv video.

  2. #2
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Controls for Flv Video player

    Hi,
    I found this link form your community need to know how do i add my flv files to the playlist....
    http://wiki.forum.nokia.com/index.ph...te3_compatible

    FYR the code looks like below

    import com.blocketpc.managers.KeyManager;

    fscommand2("FullScreen", true);

    Stage.align = "TL";
    Stage.scaleMode = "noScale";
    Stage.addListener(this);

    function onResize()
    {
    player.setSize(Stage.width, Stage.height);
    }

    player.setSize(Stage.width, Stage.height);


    //Controls for PC
    KeyManager.getInstance().addEventListener(KeyManager.ON_PRESS_KEY, this, "onPressKey");

    function onPressKey(evt:Object):Void
    {
    switch (evt.key)
    {
    case Key.UP:
    player.volumeUp();
    break;

    case Key.DOWN:
    player.volumeDown();
    break;

    case Key.LEFT:
    player.seekBackward();
    break;

    case Key.RIGHT:
    player.seekForward();
    break;

    case Key.ENTER:
    if (player.controlbar.isSeeking)
    {
    player.setSeek();
    }
    else
    {
    if (player.controlbar.isClosed)
    {
    player.setPlay();
    }
    else
    {
    player.setPause();
    }
    }
    break;
    }
    }

  3. #3
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Controls for Flv Video player

    If you want to extend this code to play playlists --

    onMeta Event handler should give you the total duration of the FLV file being embedded and if this equals the NetStream.time ( playhead on the file), you should associate the next FLV to the myStream object.

    http://flash-reference.icod.de/NetStream.html
    Twitter - manikantan_k
    Just in --

  4. #4
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Controls for Flv Video player

    Hi,
    Thanks a lot for your reply. If i wanted to load only one flv video and the keys next to previous coded to rewind and forward is it possible ? with the same components if so please help i also need the command to load the local flv video from the memory card. At present the code they have in the component is like below...

    player.setImage("http://opensource.blocketpc.com/dandelion/demos/image.jpg");
    player.setPlayList("http://opensource.blocketpc.com/dandelion/demos/playlist.txt");

    Regards,
    Elmi

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Controls for Flv Video player

    You can use the following to load the media from memory card

    player.addItem("rtsp://10.0.0.2/sample_50kbit.3gp");

    instead of the rtsp link, give the path of your file.

    Ramesh

  6. #6
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Smile Re: Controls for Flv Video player

    Hi Ramesh,
    Thanks a million for you help I have coded like you said and put an flv video into same path as the swf. Then too its not playing and even tried replacing the video with an 3gp file no use.

    FYR: I the com folder with the AS file in the same path.

    import com.blocketpc.managers.KeyManager;

    fscommand2("FullScreen", true);

    Stage.align = "TL";
    Stage.scaleMode = "noScale";
    Stage.addListener(this);

    player.setPlay("Intro-Flv.flv");

    function onResize()
    {
    player.setSize(Stage.width, Stage.height);
    }

    player.setSize(Stage.width, Stage.height);


    //Controls for PC
    KeyManager.getInstance().addEventListener(KeyManager.ON_PRESS_KEY, this, "onPressKey");

    function onPressKey(evt:Object):Void
    {
    switch (evt.key)
    {
    case Key.UP:
    player.volumeUp();
    break;

    case Key.DOWN:
    player.volumeDown();
    break;

    case Key.LEFT:
    player.seekBackward();
    break;

    case Key.RIGHT:
    player.seekForward();
    break;

    case Key.ENTER:
    if (player.controlbar.isSeeking)
    {
    player.setSeek();
    }
    else
    {
    if (player.controlbar.isClosed)
    {
    player.setPlay();
    }
    else
    {
    player.setPause();
    }
    }
    break;
    }
    }

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Controls for Flv Video player

    Can you see the output trace to figure out why the media is not being played?

    Ramesh

  8. #8
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Smile Re: Controls for Flv Video player

    Hi Ramesh,
    Thanks again i am not able to see any message in the output screen can you please help me by downloading the component and copying any dummy video and try running the app you will get the exact idea please...
    http://wiki.forum.nokia.com/index.ph...te3_compatible

    Regards,
    Elmi...

  9. #9
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Controls for Flv Video player

    Hi Elmi,

    The reason why it didnt play is that it parses the file url based on the streaming protocol. It doesnt handle the file without a url. I have modified the file \com\blocketpc\managers\EngineManager.as. Follwiing is the change. Replace the funtion getEngine with this one. It should work. I tested 3gp and flv.

    public function getEngine(url:String, v: Video) : AbstractEngine
    {
    var engine:AbstractEngine;


    if (url.indexOf("http://") != -1)
    {
    if (url.indexOf(".flv") != -1)
    {
    engine = new FLVEngine(v);
    }
    else if (url.indexOf(".mp3") != -1)
    {
    engine = new MP3Engine();
    }
    }
    else if (url.indexOf("rtmp://") != -1)
    {
    engine = new RTMPEngine(v);
    }
    else if (url.indexOf("rtsp://") != -1)
    {
    engine = new ThreeGPEngine(v);
    }
    else if (url.indexOf(".3gp") != -1)
    {
    engine = new ThreeGPEngine(v);
    }
    else if (url.indexOf(".flv") != -1)
    {
    engine = new FLVEngine(v);
    }

    return engine;
    }

    Ramesh

  10. #10
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Controls for Flv Video player

    Hi Ramesh,
    Thanks a lot i don't have words to thank you but still i am facing problem

    1) The flv video works fine on the emulator but not working on the actual device.
    2) 3Gp format works fine on both emulator and device but the control that is the time line is not popping up. Because of which i am not able to forward or rewind the video.

    Can you please help me in this...

    Regards,
    Elmi...

  11. #11
    Regular Contributor
    Join Date
    Feb 2010
    Posts
    157

    Re: Controls for Flv Video player

    Quote Originally Posted by elminator View Post
    1) The flv video works fine on the emulator but not working on the actual device.

    Elmi...
    If you say so, it might be because of the following:
    Quote Originally Posted by elminator View Post

    player.setPlay("Intro-Flv.flv");


    }
    This seems like a local file on the system, in the same path as the swf and hence works fine for the emulator. I have tried putting the flv in the same ('data') folder while packaging through Carbide C++, but the app doesnt seem to take the flv from it.
    Try to use an flv from a server. 'http' works fine. Test it first on the emulator so that you know that the transcoding has been done properly and the video plays. The same should work on your device.

    And one more thing, what is the link that you have provided? It only opens up as 'http://wiki.forum.nokia.com/index.ph...te3_compatible'

    Regards,
    Supriya Tenany

  12. #12
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Controls for Flv Video player

    Hi Elmi,

    can you post the specs of your flv file?

    Ramesh

  13. #13
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: Controls for Flv Video player

    And to address your second question, you cannot do a seek for 3gp as it is device video and handled by real player. You can only do play pause etc. You dont even get info on the duration, status (except complete) etc.

    Ramesh

  14. #14
    Regular Contributor
    Join Date
    Feb 2010
    Posts
    157

    Re: Controls for Flv Video player

    Hi,

    How about this then http://discussion.forum.nokia.com/fo...604#post730604 ?

    I need to stick to the flv in that case. Also I cannot aim to design a player with duration info for Nokia 6303c, which supports a 3gp and FL3.0.

    Regards,
    Supriya Tenany
    Last edited by supriyaakg; 2010-04-30 at 11:54.

  15. #15
    Registered User
    Join Date
    Apr 2010
    Posts
    44

    Re: Controls for Flv Video player

    Hi Ramesh & Supriya,
    Thanks a lot for you help.. I am new to Flash lire coding since i was in Flash web development previously so i don't know about loading videos to the server and calling it. All i can do is loading it locally and give an option to the user for rewind and forward since its an 19 mb video. I saw this link http://wiki.forum.nokia.com/index.ph...te3_compatible
    thought will use this component but i facing problem running an flv on the device. Please help me resolve this issue As per specs Ramesh i din't understand the video works fine if i use netstream method.

    Regards,
    Elmi...

Similar Threads

  1. Is there a C++ API for the video player
    By avbrozhko in forum Symbian
    Replies: 9
    Last Post: 2008-06-06, 14:34
  2. video player for s40 6280 6270 6265 PLEASEEE!!!!
    By expertlx in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-06-12, 05:30
  3. N7650 and video player?
    By larry_ger in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-02-18, 11:37
  4. H.263 Video Player and the Nokia 7650
    By aiiia in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×