我想在我们的露天系统上使用嵌入式Windows媒体播放器来显示.mkv等。 我已经在露天定义了Windows媒体播放器,但它没有解析与Internet Explorer不同的视频网址。我使用web-preview.js中的url作为默认值,它也为其他玩家提供了url。当我尝试使用分享按钮然后查看按钮时,我可以在每个浏览器上观看视频。
所以,我放弃了来自web-preview.js的尝试调整网址。我只是想快速分享视频详情页面的源网址。
有可能吗? 这是我的超级班。它默认永远不会改变:
getContentUrl: function WP_getContentUrl(download)
{
var proxy = window.location.protocol + "//" + window.location.host + Alfresco.constants.URL_CONTEXT + "proxy/" + this.options.proxy + "/",
nodeRefAsLink = this.options.nodeRef.replace(":/", ""),
noCache = "noCache=" + new Date().getTime();
download = download ? "a=true" : "a=false";
return proxy + this.options.api + "/node/" + nodeRefAsLink + "/content/" + encodeURIComponent(this.options.name) + "?c=force&" + noCache + "&" + download
},
getContentUrl: function WP_getContentUrl(download)
{
var proxy = window.location.protocol + "//" + window.location.host + Alfresco.constants.URL_CONTEXT + "proxy/" + this.options.proxy + "/",
nodeRefAsLink = this.options.nodeRef.replace(":/", ""),
noCache = "noCache=" + new Date().getTime();
download = download ? "a=true" : "a=false";
return proxy + this.options.api + "/node/" + nodeRefAsLink + "/content/" + encodeURIComponent(this.options.name) + "?c=force&" + noCache + "&" + download
},
getThumbnailUrl: function WP_getThumbnailUrl(thumbnail, fileSuffix)
{
var proxy = window.location.protocol + "//" + window.location.host + Alfresco.constants.URL_CONTEXT + "proxy/" + this.options.proxy + "/",
nodeRefAsLink = this.options.nodeRef.replace(":/", ""),
noCache = "noCache=" + new Date().getTime(),
force = "c=force";
// Check to see if last modification data is available for the thumbnail...
for (var i = 0; i < this.options.thumbnailModification.length; i++)
{
if (this.options.thumbnailModification[i].indexOf(thumbnail) != -1)
{
noCache = "lastModified=" + encodeURIComponent(this.options.thumbnailModification[i]) + "&" + noCache;
break;
}
}
return proxy + this.options.api + "/node/" + nodeRefAsLink + "/content/thumbnails/" + thumbnail + (fileSuffix ? "/suffix" + fileSuffix : "") + "?" + force + "&" + noCache
}
这就是我的代码的显示方法,它不适用于firefox,chrome,opera等:
display: function Video_display()
{
var src = this.attributes.src ? this.wp.getThumbnailUrl(this.attributes.src) : this.wp.getContentUrl();
var height=240;
var width=320;
var player = '<object ';
player += 'height="' + height.toString() + '" ';
player += 'width="' + width.toString() + '" ';
if (navigator.userAgent.indexOf("MSIE") < 0) {
// Chrome, Firefox, Opera, Safari
player += 'type="application/x-ms-wmp" ';
player += 'data="' + src + '" >';
}
else {
// Internet Explorer
player += 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" >';
player += '<param name="url" value="' + src + '" />';
}
player += '<param name="autoStart" value="false" />';
player += '<param name="playCount" value="1" />';
player += '</object>';
return player;
}