audio/video codecs on Windows WebKit

Hello everyone,
I need basic audio/video (e.g. mp3 and mp4) codecs on WebKit on Windows.

I know that Chromium supports only a few audio/video codecs (as stated here)
That said, from Xojo HTMLViewer documentation, I read:

"To make plugins available to WebKit on Windows, create a folder called WebKitPlugins within your Libs folder in your application folder and place the plugins you need there"

From a little research, the plugins avcodec-52.dll, avformat-52.dll, and avutil-50.dll (or later versions) should do the trick but I had no success.

I see that those files are already present in the Libs folder, so I tried to copy them also to Libs/WebKitPlugins. Again, no success.

Any ideas on that?

Thanks in advance for your help.


Sorry for the delayed response. We fought with that for a long time, also without success. Finally I went for a work around as explained on this link:

This work-around allows us to play .mp3 sound, “floating” .mp4 video, and embedded .mp4 video in local HTML content using the WebKit HTML Viewer on Windows.

Note that if you are not running local content, it may be much simpler to use the native/IE HTML viewer. But we ran into many limitations with the local/IE HTML viewer when trying to display local content (existing on the local computer, not from a Web server.)

If you are running local content, you will probably need to modify that content, either in advance or while loading into the HTML viewer. And, for embedded .mp4 videos in the WebKit HTML viewer, I’m afraid your users will have to have QuickTime installed. ;-(

When using IE make sure you use the appropriate tags in the header to force it to use the latest version available on the machine instead of its normal compatibility mode

there’s at least 2 ways

  1. edit the registry -
  2. set the correct meta tag in your html -

That MAY help

That does help with some things, but the main limitations we ran into related to IE security restriction when using local content. It seems that IE will do many things correctly when viewing Web/server-based content, but has enforces significant limitations when viewing local content. And local content is pretty important for a fair number of our users as we’re creating/delivering educational content for use in emerging markets–places where Internet connections are slow/rare or non-existent.

Ah yes - IE protecting your from your own stuff :slight_smile:

In the same vein, Safari iOS cannot play or show local files.

What about serving these files through a serversocket ?

Safari literally has no handler for “file:///” - thats why it refuses - which is not the same as why IE refuses
IE does have a handler but mistrusts local content

There are hacks that let you add file:// url schemes to iOS but they require you to jailbreak your device
Or other browsers for iOS that do handle that scheme (goodbrowser etc)
The choice to not provide access to this URL scheme on iOS is one I dont agree with BUT I understand why they do it
It’s for the same reason you dont have direct access to the file system in the iOS UI

Did you try MOTW? (“mark of the web”) it’s a special tag you put in HTML to let IE know it’s local trusted content.

That is a very good idea. But the MS document does not mention a way to add file:/// which is the origin of local files URL.

It would be rather easy to add the URL of a ServerSocket, though, like

I use a ton of “file:///” urls in IE11 and they work fine. Edge, however, chokes on them (but for better or worse, the Edge browser engine is not available to HTMLViewers).

(I’m talking about “file:///” URLs inside a file with a .html extension that’s stored on the local hard drive - perhaps that’s not the same as what you are doing?)

Edge is sandboxed, hence it requires a local server.

They did some magic to support local pdf files, though. During beta, Edge was not able to do so.