I am using silverlight player in our project. It is working well. These days I was loking for silverlight events becasue I will send some information to google analytics on player pause,resume and play events. I checked lots of article. Unfortunately there is no information about these events. All articles give the same example and same events.(onError and onLoad events). How can I add play,pause and resume events in javascript? Please check below javascript code.
Silverlight.createObject("XXXXXXXXX",player.get(0),"xxPlayer",
{
width: playerWidth + "", height: playerHeight + "", background: "black"version: "4.0.60310.0",enableHtmlAccess: true'},
{ onError: onSilverlightError, onLoad: null },
extra, "context");
There is a general purpose
CurrentStateChangedevent which returns the current state of the media (playing, stopped, etc.)MediaElement events
To access the events you need something like this:
Then you can fill out the
onCurrentStateChangedJavaScript to do what you want.Handling Silverlight events in JavaScript (MSDN)