Determine when FLV video stops playing naturally?

DLL Edition of the F-IN-BOX
key88sf
Posts: 17
Joined: Wed Apr 30, 2008 4:48 pm

Determine when FLV video stops playing naturally?

Postby key88sf » Tue Oct 07, 2008 9:54 pm

Is there a way to be notified when playback of an FLV file ends because the end of the video is reached?

I tried FPCN_ONREADYSTATECHANGE, but that is called with state == 4 almost immediate when the video begins playing. I need to know when the end of the video has been reached normally.

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

Re: Determine when FLV video stops playing naturally?

Postby Softanics » Wed Oct 08, 2008 9:11 am

Thank you for your question.

key88sf wrote:Is there a way to be notified when playback of an FLV file ends because the end of the video is reached?

I tried FPCN_ONREADYSTATECHANGE, but that is called with state == 4 almost immediate when the video begins playing. I need to know when the end of the video has been reached normally.


Only if a FLV player supports this.

The player I've sent you should support it. Handle FPCN_FLASHCALLW to receive notifications. Handle notification onVideoStatus, the following status is available:
NetConnection.Connect.Success
NetStream.Play.Start
NetStream.Play.StreamNotFound
NetStream.Play.Stop
NetStream.Buffer.Empty
NetStream.Buffer.Full

You need NetStream.Play.Stop.

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

key88sf
Posts: 17
Joined: Wed Apr 30, 2008 4:48 pm

Postby key88sf » Wed Oct 08, 2008 4:29 pm

Cool, that works :)

I have tried using the JW FLV Player (http://www.jeroenwijering.com/?item=JW_FLV_Player) which also works in my code, but I do not receive callbacks from it with FPCN_FLASHCALLW.

Maybe I have to call their function called "addControllerListener(event,function)" ? I'm not sure how to do this properly though...I would need to supply a callback function there. It seems designed more for javascript / html. Any ideas?

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

Postby Softanics » Wed Oct 08, 2008 8:05 pm

key88sf wrote:I have tried using the JW FLV Player (http://www.jeroenwijering.com/?item=JW_FLV_Player) which also works in my code, but I do not receive callbacks from it with FPCN_FLASHCALLW.

Maybe I have to call their function called "addControllerListener(event,function)" ? I'm not sure how to do this properly though...I would need to supply a callback function there. It seems designed more for javascript / html. Any ideas?


I haven't explored the code of this player :) So not sure how to improve it ;)

So your code works well with our new player?

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

key88sf
Posts: 17
Joined: Wed Apr 30, 2008 4:48 pm

Postby key88sf » Wed Oct 08, 2008 11:32 pm

Yes, with the new player it works :)

It would be really nice to have the callbacks and settings of either the new player (or the JW FLV Player) integrated into the C++ code of f-in-box. For example, handling progress, seek, and play notifications would be very valuable :)

The JW FLV Player is extremely popular, and is open source. Should be ideal for integration :) Thanks!


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 14 guests