Movie and video end

.NET Edition of the F-IN-BOX
T
Posts: 3
Joined: Fri Oct 16, 2009 8:49 am

Movie and video end

Postby T » Mon Oct 19, 2009 9:29 am

Is there any way to know the movie / video end? Is there any media end event?

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

Postby Softanics » Mon Oct 19, 2009 11:18 am

Thank you for your question.

Yes, it's possible. Check sample Sample08_Advanced_FLV_Player:

Code: Select all

        private void f_in_box__control1_OnFlashCall(object sender, string request)
        {
            f_in_box__lib.f_in_box__control f_in_box__control = (f_in_box__lib.f_in_box__control)sender;
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(request);

            string strRequestName = doc.DocumentElement.Attributes["name"].Value;

            switch (strRequestName)
            {
...
                case "onVideoStatus":
                {
                    string strVideoStatus = doc.DocumentElement.ChildNodes[0].ChildNodes[0].InnerText;

                    break;
                }
            }
        }



strVideoStatus is "NetStream.Play.Stop", when video has finished.

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

T
Posts: 3
Joined: Fri Oct 16, 2009 8:49 am

Postby T » Tue Oct 20, 2009 2:18 am

How about flash movie (.swf)?

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

Postby Softanics » Tue Oct 20, 2009 7:59 am

T wrote:How about flash movie (.swf)?


For simple movie compare periodically the number of the current frame with the number of last frame, i.e. the end when:

Code: Select all

f_in_box__control1.FlashProperty_FrameNum == f_in_box__control1.FlashProperty_TotalFrames - 1


is true.

But a movie can contain a single frame with complex animation within it. In this case, no method to detect the end.

Moreover, in general, "movie's end" doesn't have a sense.

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 30 guests

cron