Loop not working for flv files

.NET Edition of the F-IN-BOX
1x2x1x2x
Posts: 1
Joined: Mon Nov 17, 2008 11:12 am

Loop not working for flv files

Postby 1x2x1x2x » Mon Nov 17, 2008 11:17 am

Hi, any idea wat's wrong with my code below?
I can play .flv file without any problem by following samples given. However, I couldn't make it AutoReplay even I set Loop = true.

Any suggestion would be appreciated


------------------------- Code ---------------------------
// Create the interop host control.
WindowsFormsHost host = new WindowsFormsHost();

// Create the ActiveX control.
f_in_box__control player = new f_in_box__control();

player.FlashMethod_SetVariable("repeat", "always");
player.FlashProperty_Loop = true;
//player.FlashProperty_Scale = "ShowAll";
//player.FlashProperty_ScaleMode = 0;

// Assign the ActiveX control as the host control's child.
host.Child = player;
host.Background = Brushes.Pink;
Grid.SetColumn(host, 0);
Grid.SetRow(host, 0);

// Add the interop host control to the Grid
// control's collection of child controls.
this.Root.Children.Add(host);



player.FlashProperty_FlashVars = "FLVPath=" + HttpUtility.HtmlEncode("file://" + @"D:\Chan\Code\WPFSandbox\WPFSandbox\flv\20051210-w50s.flv");
player.PutMovieFromStream(this.GetType().Assembly.GetManifestResourceStream("WPFSandbox.flv.FLVPlayer.swf"));

player.FlashMethod_Play();
------------------------------------------------------------------

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

Postby Softanics » Mon Nov 17, 2008 2:45 pm

Thank you for your question.

Yes, actually FLVPlayer.swf doesn't support loop.

I can suggest the following workaround. Create a timer. Check periodically f_in_box__control1.FlashMethod_GetVariable("FLVPosition"), when it doesn't change more, set f_in_box__control1.FlashMethod_SetVariable("FLVPosition", 0)

I hope it's suitable.

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


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 18 guests

cron