为所有浏览器嵌入Windows Media Player [英] Embedding Windows Media Player for all browsers

查看:299
本文介绍了为所有浏览器嵌入Windows Media Player的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在内部网站上使用 WMV 视频,并将其嵌入到网站中.这在Internet Explorer上效果很好,但在Firefox上效果不佳.我已经找到了使其在Firefox中运行的方法,但是随后它在Internet Explorer中停止了工作.

We are using WMV videos on an internal site, and we are embedding them into web sites. This works quite well on Internet Explorer, but not on Firefox. I've found ways to make it work in Firefox, but then it stops working in Internet Explorer.

我们暂时还不想使用Silverlight,尤其是因为我们不能确定所有客户端都将在安装Windows Media Player的情况下运行Windows XP.

We do not want to use Silverlight just yet, especially since we cannot be sure that all clients will be running Windows XP with Windows Media Player installed.

是否存在将WMP嵌入到Internet Explorer和Firefox中的通用代码,还是我们需要实现一些用户代理检测并为不同的浏览器提供不同的HTML?

Is there some sort of Universal Code that embeds WMP into both Internet Explorer and Firefox, or do we need to implement some user-agent-detection and deliver different HTML for different browsers?

推荐答案

以下内容适用于Firefox和Internet Explorer:

The following works for me in Firefox and Internet Explorer:

<object id="mediaplayer" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701" standby="loading microsoft windows media player components..." type="application/x-oleobject" width="320" height="310">
<param name="filename" value="./test.wmv">
     <param name="animationatstart" value="true">
     <param name="transparentatstart" value="true">
     <param name="autostart" value="true">
     <param name="showcontrols" value="true">
     <param name="ShowStatusBar" value="true">
     <param name="windowlessvideo" value="true">
     <embed src="./test.wmv" autostart="true" showcontrols="true" showstatusbar="1" bgcolor="white" width="320" height="310">
</object>

这篇关于为所有浏览器嵌入Windows Media Player的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆