[vlc-commits] Support the attribute "type" in Internet Explorer

Jean-Baptiste Kempf git at videolan.org
Sat Dec 13 16:25:35 CET 2014


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Dec 13 16:24:52 2014 +0100| [8ff57098ffca751221b7e510b85db528df511876] | committer: Jean-Baptiste Kempf

Support the attribute "type" in Internet Explorer

Currently you must use the classid for the <object> element:
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"></object>

The attached registry keys allows to use the MIME Type "x-vlc-plugin"
for the <object> element, like the <embed> element, too:
<object type="application/x-vlc-plugin"></object>

In addition this patch allows to use the <embed> element in Internet
Explorer.

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=8ff57098ffca751221b7e510b85db528df511876
---

 activex/main.cpp |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/activex/main.cpp b/activex/main.cpp
index ad97f67..e88e6d7 100644
--- a/activex/main.cpp
+++ b/activex/main.cpp
@@ -175,6 +175,8 @@ STDAPI DllUnregisterServer(VOID)
 
     SHDeleteKey(HKEY_CLASSES_ROOT, TEXT(PROGID_STR));
 
+    SHDeleteKey(HKEY_CLASSES_ROOT, TEXT("MIME\\Database\\Content Type\\application/x-vlc-plugin"));
+
     UnregisterProgID(CLSID_VLCPlugin, 2);
     UnregisterProgID(CLSID_VLCPlugin2, 1);
 
@@ -222,6 +224,17 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
                 keyClose(keySetDef(keyCreate(hProgKey, TEXT("CurVer")),
                                    progId));
             }
+            
+            // register the mime type for the type attribute
+            hProgKey = keyCreate(HKEY_CLASSES_ROOT, TEXT("MIME\\Database\\Content Type\\application/x-vlc-plugin"));
+            if( NULL != hProgKey )
+            {
+                // default key value
+                keySetDef(hProgKey, description);
+
+                keyClose(keySet(hProgKey, TEXT("CLSID"),
+                                szCLSID, sizeof(szCLSID)));
+            }
         }
         hClassKey = keyCreate(hParent, szCLSID);
     }



More information about the vlc-commits mailing list