0

Video Player Events in VB.Net

How do I respond to the video player events in vb.net.
Not sure on how to use the callback handler
QUOTE
To use these events, be sure to specify a callback handler through the "eh" parameter: so.addVariable('eh', 'myCallbackEventHandler')

I need a code example.
I have this so far but after this I am lost.
CODE
Flash.FlashVars = "controlsEnable=0&postpanelEnable=0&eh=OnFlashStream"

Who do I write the callback function?

1 Reply
  • Got it working, had to use the FlashCall event

    CODE
    Private Sub Flash_FlashCall(ByVal sender As System.Object, ByVal e As AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEvent) Handles Flash.FlashCall
    Dim xdoc As New Xml.XmlDocument
    xdoc.LoadXml(e.request)

    Dim Invoke As XmlNode = xdoc.FirstChild
    Dim CallBackName As String = GetAttribute(Invoke, "name")

    Select Case CallBackName
    Case "OnStream" ' this is my callback function name

    Dim Arguments As XmlNode = Invoke.FirstChild
    Dim MyEvent As XmlNode = Arguments.FirstChild
    Select Case MyEvent.InnerText
    Case "init" '// thrown when the player has been initialized and the flash external API is ready to be accessed
    Case "itemBegin" '// thrown when a video starts playing for the first time
    Case "itemEnd" '// thrown when a video has played for its total duration
    Case "done" '// thrown when all videos have played
    Case "streamPlay" '// thrown anytime a video begins to play
    Case "streamPause" '// thrown when vidPause() is requested and completed
    Case "streamStop" '// thrown when playback has stopped for whatever reason (not the same as itemEnd)
    Case "streamError" '// thrown when an error occurs with the stream
    Case "userClick" '// thrown when a user click on playback components w/i the post panel
    End Select
    Case "eval"

    Case "y_up.player.setPercentLoaded"

    Case "reportEvent"

    End Select
    0
This forum is locked.

Recent Posts

in Video Player