Play .mp3 sounds in WebKit HTMLViewer on Windows?

Has anyone had any luck playing .mp3 files in HTML content in the WebKit HTMLViewer on Windows?

From research online, it seems that Chromium Embedded does not include support for .mp3 files.

I can play .mp3 files in the WebKit HTMLViewer on the Mac, but no luck on Windows.

I can get WebKit to play .wma files on Windows, but can’t get it to play any .mp3 files, although I’ve tried many work-arounds, including using various Flash sound players. (I don’t think the WebKit includes Flash.)

I’m running out of things to try so would appreciate any thoughts or suggestions. :wink:

[quote=157013:@Dan Oja]Has anyone had any luck playing .mp3 files in HTML content in the WebKit HTMLViewer on Windows?

From research online, it seems that Chromium Embedded does not include support for .mp3 files.

I can play .mp3 files in the WebKit HTMLViewer on the Mac, but no luck on Windows.

I can get WebKit to play .wma files on Windows, but can’t get it to play any .mp3 files, although I’ve tried many work-arounds, including using various Flash sound players. (I don’t think the WebKit includes Flash.)

I’m running out of things to try so would appreciate any thoughts or suggestions. ;-)[/quote]

I tried using the HTML5 audio element. It shows but is not enabled.

The only workaround I can think of is to use the VideoPlayer, in addition to the HTMLViewer.

Hi Michel.
That’s pretty much matches what I found–no matter what I did, the WebKit HTMLViewer on Windows just refused to play .mp3 files.

I can’t use the Native HTMLViewer as it has some serious problems with local HTML content/JavaScript. And I don’t really want to just link to a local browser.

The problem with using the Video Player is that I’m “playing” HTML/JavaScript content which includes the media linked to the HTML content. We output that content for delivery in many ways (Mac app, Windows app, Android APK, iOS app, browser HTML, etc.), so I really want to play the .mp3 from the link in the HTML.

I’m still “chewing on it”–hoping to find some solution. :wink:

I am afraid that there won’t be a solution. Webkit on Windows has a pretty restricted level with no cookies, no MRU input fields and no plugins. As workaround I would suggest to use IE Engine where you can use MP3 plugins or mediaplayers.

The IE runs also in a restricted mode, using IE8 Rendering Engine even when IE 11 is used. But with some registry tweaks (you have to put your exe file as exception for IE, you will get fully IE11 with all plugins, CSS and HTML5.

Here is more info on this: http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version

[quote=157038:@Dan Oja]Hi Michel.
That’s pretty much matches what I found–no matter what I did, the WebKit HTMLViewer on Windows just refused to play .mp3 files.

I can’t use the Native HTMLViewer as it has some serious problems with local HTML content/JavaScript. And I don’t really want to just link to a local browser.

The problem with using the Video Player is that I’m “playing” HTML/JavaScript content which includes the media linked to the HTML content. We output that content for delivery in many ways (Mac app, Windows app, Android APK, iOS app, browser HTML, etc.), so I really want to play the .mp3 from the link in the HTML.

I’m still “chewing on it”–hoping to find some solution. ;-)[/quote]

From what I tried, native would not play mp3 or even display the HTML5 audio player (not supported).

If the mp3 files are simply linked, you can catch their URL in the CancelLoad event when clicked on and send them to the VideoPlayer.

Do you have control over the html? If so, set the htmlviewer to native and add the following code to the html section:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

That should tell IE to run in the latest version it can instead of compatibility mode (which is usually IE7 or IE8). If that fixes your javascript issues, playing mp3s may work better.

[quote=157039:@Tomas Jakobs]
Here is more info on this: http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version[/quote]

Windows 10 has changed the keys mentioned in the article pointed to. See
https://forum.xojo.com/5922-htmlviewer-displays-differently-than-the-browser/0

That is nice to add in the HtmlHeader of a web app to make sure to always get the latest renderer. Thank you, Greg.