Search code examples
javascriptinternet-exploreractivexwindows-embedded

ActiveX control not accessible via JavaScript


Please look at this simple sample code to embed the VLC web plugin in IE and access a property of the plugin:

    <div id="player">
        <object type="application/x-vlc-plugin" 
            id="vlc" 
            width="676px"
            height="386px" 
            classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921">  
        </object>
    </div>

    <input type="button" onclick="alert(vlc.VersionInfo);">

This works fine on PC#1, giving me the current Version of the plugin. On PC#2, on the other hand, this gives "undefined". From the debugger I can see that the vlc-object does not have the properties it should have.

What strikes me is that the plugin itself on PC#2 is capable of playing video streams (when adding the Src-Param to the object-tag). It just seems not capable of being accessed via JavaScript.

So far I've tried..

  • changing IE security settings to super-low on PC#2
  • adding the plugins classid to the Pre-Approved registry folder
  • checked for Group Policies that might disable ActiveX in IE somehow
  • several versions of VLC

Any ideas on what could cause such a strange behavior are very welcome!

EDIT: it might be relevant to add that PC#2 is running on Windows Embedded Standard (it's a WYSE ThinClient)..


Solution

  • I had same problem trying to access VLC object (both from NSAPI / ActiveX) from JS. On my case it depends from VLC release. Currently, if I use 2.0.2 all is ok (both NSAPI and AciveX). Newer releases seems to break JS wrapping of VLC object.

    U can try with 2.0.2 release and check if u solve your problem.