Page 1 of 1
Some queries
Posted: Tue May 05, 2009 4:28 pm
by amey2009
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");
Posted: Tue May 05, 2009 8:16 pm
by Softanics
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.
Posted: Wed May 06, 2009 4:43 am
by amey2009
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
Posted: Wed May 06, 2009 9:55 am
by Softanics
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.
Posted: Wed May 06, 2009 6:03 pm
by amey2009
Hey thnx
I will definitely try it and let u know.
Thnx again for ur quick and kind reponse
Thank you