PDA

View Full Version : videoplayer onstop event


hardik
10-04-2008, 01:34 PM
Hello All,

I want do something when video stops playing

<class name="mediaplayer" extends="videoplayer">
<attribute name="size_x" />
<attribute name="size_y" />
<attribute name="width" value="${canvas.width * (size_x / 100)}" />
<attribute name="height" value="${width * .75}" />

</class>

<mediaplayer name="vp" size_x="45" x="270" y="200" autoplay="true" opacity="0" >

<handler name="onstop">
//do something
</handler>
</mediaplayer>

I also tried ondestroy but it does not work

How to do this?

Thanks,

hardik
10-04-2008, 03:52 PM
I am answering myself
Its the mediastream inside VideoScreen that plays the video and onstart , onstop event gets fired on mediastream and not on videoplayer

<handler name="onstop" reference="this.vscreen.ms">
Debug.write("onstop called on mediastream"/>
</handler>

Thank you,