当前位置: 动力学知识库 > 问答 > 编程问答 >

osx - Why the set of plugins can be different between Safari and WebView component?

问题描述:

Our Mac desktop application embeds WebView component from WebKit framework.

Inside WebView we host Flash Player where we render UI.

As far as I know, Safari uses WebKit/WebView to display the content.

We were expecting Safari to host the same WebView component our application hosts.

In other words, if Flash plugin is installed in Safari, than Flash will be available in our WebView.

Unfortunately this appeared to be wrong for one of our users.

On his Mac, Flash runs flawlessly in Safari, but our WebView displays "Missing Plugin" message in place of Flash Player.

Mac OS X 10.5.8

Why this can happen?

Is it possible Safari to use a different WebView (or WebView settings) than our application is using?

I would appreciate any advice that would help us to find the source of the problem.

I have asked the user to run a small script that prints a set of plugins installed for Safari and for our WebView.

There are around 20 plugins installed in Safari, including Flash Player.

But there are only 3 plugins installed for our WebView.

Here they are:

Java Plug-In 2 for NPAPI Browsers

Switchable Java Plug-In for WebKit

RealPlayer Plugin.plugin

Pasha

网友答案:

Is it possible Safari to use a different WebView (or WebView settings) than our application is using?

Yes, very much so. A WebView is simply a class, and Safari uses one instance of such a class, which doesn't get modified for a plug-in. The Flash plug-in is installed for the browser (as in, Safari keeps track of where it is installed and looks for it as necessary). Cocoa's WebView doesn't get modified whenever a plug-in is installed—that could lead to all sorts of issues.

分享给朋友:
您可能感兴趣的文章:
随机阅读: