.mkv などを表示するために、屋外システムに埋め込まれた Windows Media Player を使用したいです。既に屋外で Windows Media Player を定義しましたが、Internet Explorer とは異なるビデオ URL を解決しません。デフォルトとして、他のプレイヤーにも URL を提供する web-preview.js からの URL を使用します。共有ボタンを使用してから表示ボタンを使用しようとすると、各ブラウザーでビデオを見ることができます。
というわけで、web-preview.js から URL を調整しようとするのは諦めました。ビデオの詳細ページのクイック共有のソース URL を取得したいだけです。
出来ますか?これが私のスーパークラスです。デフォルトは変更されていません。
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;
}