嵌入Weather Underground网络摄像头失败:官网Flash代码无法正常运行求助
Got it, let's break down why that embed code isn't working and how to fix it.
The Root Problem
The official embed code uses Adobe Flash Player, which has been fully deprecated by every major browser (Chrome, Firefox, Edge, Safari) since 2021. Modern browsers block all Shockwave Flash content entirely, so that old <object> tag setup has no chance of running.
Solution 1: Use HTML5 Video (Quickest Fix)
You can skip the outdated Flash stuff entirely and embed the MP4 directly with the HTML5 <video> tag—this works everywhere. Here's a ready-to-use code snippet based on your webcam's video URL:
<div style="text-align:center"> <video width="640" height="480" controls autoplay muted> <source src="https://www.wunderground.com//icons.wunderground.com/webcamcurrent/k/e/Kehlegg/1/current.mp4" type="video/mp4"> Your browser does not support the video tag. </video> <p> <a href="/webcams/Kehlegg/1/video.html">Kehlegg's Video Archive</a> — <a href="/webcams/">Weather Underground Webcams</a> </p> </div>
- The
mutedattribute is included because most browsers block autoplay for videos with sound. If you don't want autoplay, just changeautoplaytofalse. - The
controlstag adds play/pause, volume, and fullscreen buttons for users.
Solution 2: Check for Updated Official Embed Code
Weather Underground might have replaced their Flash embeds with modern HTML5 options. Head back to the webcam's page, look for an "Embed" button or section—they might provide an <iframe> or updated video code that's already optimized for current browsers.
Why the Original Code Failed
Just to clarify the issues in the original snippet:
- It uses the
<object>tag withtype="application/x-shockwave-flash", which browsers no longer recognize or support. - The Flash SWF file referenced (
flowplayer.commercial-3.2.8.swf) is an outdated player that can't load in any modern browser. - Even if the Flash player did work, the
flashvarsconfiguration is tied to that deprecated technology.
内容的提问来源于stack exchange,提问作者Normenxx




