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

922
rossmcm

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.

0
Вы хотите переключиться на WMP на своем компьютере (по теме здесь), или сама веб-страница делает это для пользователя? (будет для переполнения стека) random 9 лет назад 0
Спасибо @random. Я хочу создать веб-страницу с «доказательством концепции», которая будет работать с компьютером и браузером Joe Average, что и для IE. Моя проблема в том, что я не могу заставить Chrome на моем компьютере использовать то, что использует IE (предположительно, WMP). Это может быть потому, что у меня был установлен плагин VLC. rossmcm 9 лет назад 0

0 ответов на вопрос