2

need your help.

I'm trying to play flv file in desktop application using .net c# and jw player http://www.jeroenwijering.com/?item=JW_FLV_Player. I already looked at several places such as: Embedding flv (flash) player in windows forms http://www.codeproject.com/KB/audio-video/flashexternalapi.aspx and some others, but did find the answer.

I added a flash object to the form, the programs starts without any problem and i can see a flash player.

    string swf_path = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "player.swf";
    flash.LoadMovie(0, swf_path);
    flash.ScaleMode = 0;
    flash.AllowScriptAccess = "always";
    flash.Play();

The problem is that i don't know how to control player, i don't know how to specify flv file to play.

I tried the following:

flash.CallFunction("<invoke name=\"getConfig\" returntype=\"xml\"> </invoke>");
flash.CallFunction("<invoke name=\"sendEvent\" returntype=\"xml\">" + " <arguments><string>volume</string><number>10</number></arguments> </invoke> ");

and it works, i can get info about player variables and change volume, but for example the code below does not work:

flash.CallFunction("<invoke name=\"sendEvent\" returntype=\"xml\">" + " <arguments><string>file</string><string>video.flv</string></arguments></invoke>");
flash.CallFunction("<invoke name=\"sendEvent\" returntype=\"xml\">" + " <arguments><string>image</string><string>preview.jpg</string></arguments></invoke>");

Can someone provide a few examples of how to define an flv file name, how to define a preview image, how to control player states?

thanks.

Community
  • 1
  • 1
becool_max
  • 121
  • 1
  • 8

0 Answers0