johndyer/mediaelement — Issue #375: Silverlight not responsive in IE, also play button is misplaced
Author: arnars
Created: 2012-01-31 13:14:10+00:00
State: open

I get this error when trying to use Silverlight to play wmv in IE. It works fine in Chrome/Firefox

SCRIPT16389: System.ArgumentException: Invalid InvokeType for this operation.
Parameter name: invokeType
at System.Windows.Browser.ManagedObjectInfo.ScriptMethod.Invoke(ManagedObject obj, InvokeType invokeType, ScriptParam[] args)
at System.Windows.Browser.ManagedObjectInfo.Invoke(ManagedObject obj, InvokeType invokeType, String memberName, ScriptParam[] args)
at System.Windows.Hosting.ManagedHost.InvokeScriptableMember(IntPtr pHandle, Int32 nMemberID, Int32 nInvokeType, Int32 nArgCount, ScriptParam[] pArgs, ScriptParam& pResult, ExceptionInfo& pExcepInfo)

It localizes to this line in the code:
// additional non-HTML5 methods
setVideoSize: function (width, height) {

//if (this.pluginType == 'flash' || this.pluginType == 'silverlight') {
if (this.pluginElement.style) {
this.pluginElement.style.width = width + 'px';
this.pluginElement.style.height = height + 'px';
}
->(this line) if (this.pluginApi != null && this.pluginApi.setVideoSize) {
this.pluginApi.setVideoSize(width, height);
}
//}
},

Image of misplaced play-button:
http://dl.dropbox.com/u/160123/meJS.png