Some queries

.NET Edition of the F-IN-BOX
amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Some queries

Postby amey2009 » Tue May 05, 2009 4:28 pm

am referring Sample08_Advanced_Flv_Player of .Net edition.
Now my requirement are :
1) While playing video, i dont want to show the controls of play/pause, fullscreen on the player.
2) I want to set the position of the movie dynamically, i.e anytime i should be able to play movie directly from 2nd minute.
3) I have read in the forum that i can use :
f_in_box__control1.FlashMethod_SetVariable("ShowControls", "false");

to disable controls from movie player, but it did not work.

4. Also the below code did not work for stopping the movie
f_in_box__control1.FlashMethod_SetVariable("FLVPosition", "0");

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Tue May 05, 2009 8:16 pm

Thank you for your questions.

Sample08_Advanced_Flv_Player doesn't use FlashMethod_SetVariable at all.

> 1) While playing video, i dont want to show the controls of play/pause, fullscreen on the player.

To hide controls:
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"hideAllControl\" returntype=\"void\"><arguments></arguments></invoke>");

To show controls:

f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"showAllControl\" returntype=\"void\"><arguments></arguments></invoke>");

> 2) I want to set the position of the movie dynamically, i.e anytime i should be able to play movie directly from 2nd minute.

int Position = 2;

f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"seekVideo\" returntype=\"xml\"><arguments><number>" + ((int)Position).ToString() + "</number></arguments></invoke>");

> 4. Also the below code did not work for stopping the movie
> f_in_box__control1.FlashMethod_SetVariable("FLVPosition", "0");

To stop:

f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"pauseVideo\" returntype=\"void\"><arguments></arguments></invoke>");

Please write me if you need more assistance.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Wed May 06, 2009 4:43 am

Hi
Thanks for your quick and prompt reply.

1. To hide controls: (not working)
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"hideAllControl\" returntype=\"void\"><arguments></arguments></invoke>");

2. Seek Video (Working)
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"seekVideo\" returntype=\"xml\"><arguments><number>" + ((int)Position).ToString() + "</number></arguments></invoke>");

3. To Stop Video : (Working)
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"pauseVideo\" returntype=\"void\"><arguments></arguments></invoke>");

So I need to know is there anything else to do for hiding controls. Following is my implementation of the code :

f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"hideAllControl\" returntype=\"void\"><arguments></arguments></invoke>");
f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv";
f_in_box__control1.PutMovieFromStream(ms);
...
ContentProvider ContentProvider = new ContentProvider(f_in_box__control1.AxCode, memoryStream);

Thank You

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed May 06, 2009 9:55 am

amey2009 wrote:So I need to know is there anything else to do for hiding controls. Following is my implementation of the code :

f_in_box__control1.FlashMethod_CallFunction("<invoke name="hideAllControl" returntype="void"><arguments></arguments></invoke>");
f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv";
f_in_box__control1.PutMovieFromStream(ms);


The correct code is:

Code: Select all

f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv";
f_in_box__control1.PutMovieFromStream(ms);
f_in_box__control1.FlashMethod_CallFunction("<invoke name="hideAllControl" returntype="void"><arguments></arguments></invoke>");


Notice that I call

f_in_box__control1.FlashMethod_CallFunction("<invoke name="hideAllControl" returntype="void"><arguments></arguments></invoke>");

after

f_in_box__control1.PutMovieFromStream(ms);

Another way, you can write:

f_in_box__control1.FlashProperty_FlashVars = @"type_video=flv&url=http://FLV/FlashVideo.flv&hide_control=true";

It's better.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

amey2009
Posts: 9
Joined: Tue May 05, 2009 1:16 pm

Postby amey2009 » Wed May 06, 2009 6:03 pm

Hey thnx
I will definitely try it and let u know.

Thnx again for ur quick and kind reponse

Thank you


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 17 guests