I am trying to get the Lync presence indicator to work correctly on Internet Explorer, FireFox, and Chrome. According to these references, it is possible.
Reference 1 has an example HTML file. I downloaded that and have been trying it out. After two minor edits (complete the closing </html>
tag and fix a JavaScript replacement function to use global regular expressions), it works fine with Internet Explorer, but fails with FireFox and Chrome. When I use Chrome's or FireFox's JavaScript debuggers, all the lines involved in creating an <object/>
element are skipped, that is lines 7 through 13. Line 14 executes, but since the element was never created, variable c
remains null.
1. function CreateNPApiOnWindowsPlugin(b) {
2. var c = null;
3. if (IsSupportedNPApiBrowserOnWin())
4. try {
5. c = document.getElementById(b);
6. if (!Boolean(c) && IsNPAPIOnWinPluginInstalled(b)) {
7. var a = document.createElement("object");
8. a.id = b;
9. a.type = b;
10. a.width = "0";
11. a.height = "0";
12. a.style.setProperty("visibility", "hidden", "");
13. document.body.appendChild(a);
14. c = document.getElementById(b)
15. }
16. } catch (d) {
17. c = null
18. }
19. return c
10. }
I have attempted to convert the above code from using straight JavaScript to using the equivalent jQuery, but I still see the same behavior. The lines involved in adding the <object/>
element are skipped. Reference 2, above has similar code. I tested that and again I saw the same behavior in FireFox. Chrome's debugger behaves in a similar manner, skipping over the code which creates the <object/>
element, though it seems to skip over additional lines before and after.
Edit
After some more debugging and use of alert
statements, it appears that IsNPAPIOnWinPluginInstalled
is returning false
or undefined
. Additional investigation indicates that the Office Plugin for NPAPI Browsers is either not present or not correctly installed. List of navigator.mimeTypes
does not include "application/x-sharepoint-uc"
, though it does have "application/x-sharepoint"
. The machine has MS Office 2010 Pro and Lync 2013 installed, so I'm not sure why this plugin is missing while other MS Office related plugins appear in the list for FireFox.
Edit 2
I shelved work on this for a while. But it is still in my queue. The full Office 2013 was recently installed on my machine. This seems to have registered the updated plugin on FireFox. I'm still having issues with Chrome.
On FireFox, after removing my attempts to jQuery'ize the sample code, it began working correctly. It still fails on Chrome. The major difference between Chrome and FireFox for this issue is that ...\Office15\NPSPWRAP.DLL
is a registered plugin for FireFox but not Chrome. Any suggestions on how to get it registered with Chrome?
Use of NPAPI plugins are disabled in Chrome since 1 Sep 2015, please read more here. https://support.google.com/chrome/answer/6213033?hl=en
Not sure how to get it enabled, i thought a flag would be there to enable it back, but its not available. only PPAPI plugins can be enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With