Chrome will not load a web page with an <embed> element

Posted by rossmcm on Super User See other posts from Super User or by rossmcm
Published on 2014-06-08T21:30:06Z Indexed on 2014/06/09 21:29 UTC
Read the original article Hit count: 231

I have been trying to get a simple sound web page going:

Sound.html

<script>
function PlaySound ()
{
var 
    sounder = document.getElementById ("ToneA") ;

sounder.Play () ;
}

</script>

<embed id="ToneA" height="1" width="1" src="https://dl.dropboxusercontent.com/u/311035/ToneA.mp3" autostart="false" enablejavascript="true"//>
<button onclick="PlaySound () ;">Play</button>

The test web page is here. It plays in IE, but not in Firefox or Chrome.

My problem: Chrome reports "Could not load VLC Plugin". It seems to be a known problem that the VLC community don't necessarily feel like fixing at the moment, and is a result of Google choosing not to allow some certain kind of plugin. If I disable the plugin I no longer get the message but nothing happens when I click the button. Looking at the console in a debug window I see

Uncaught TypeError: undefined is not a function Sound.html:7
PlaySound Sound.html:7
onclick

which suggests Chrome could not find anything else to handle the sound file. How to I tell Chrome to use (e.g.) Windows Media Player?

* UPDATE *

This is apparently because the VLC plugin is a NPAPI plugin and Chrome no longer supports these. I have uninstalled VLC and this has removed the error on loading the webpage with an embedded sound element, but it still doesn't invoke WMP instead.

© Super User or respective owner

Related posts about google-chrome

Related posts about audio