我正在閱讀新Azure媒體播放器的文檔(https://aka.ms/ampdocs),但我仍然無法弄清楚如何關閉AMS徽標。我應該設置關閉媒體播放器中的Azure Media Services徽標
amp.Player.LogoConfig.enabled = false
?這對我不起作用。我在<video>
標籤上設置了什麼?我找不到一個能夠告訴我如何的樣本。
我正在閱讀新Azure媒體播放器的文檔(https://aka.ms/ampdocs),但我仍然無法弄清楚如何關閉AMS徽標。我應該設置關閉媒體播放器中的Azure Media Services徽標
amp.Player.LogoConfig.enabled = false
?這對我不起作用。我在<video>
標籤上設置了什麼?我找不到一個能夠告訴我如何的樣本。
我今天也遇到了這個問題。這裏是解決
<video id="azuremediaplayer"
class="azuremediaplayer amp-default-skin amp-big-play-centered"
controls autoplay
width="640"
height="360"
poster="<Your poster>"
data-setup='{"logo": { "enabled": false }, "techOrder": ["azureHtml5JS", "flashSS", "silverlightSS", "html5"], "nativeControlsForTouch": false}' tabindex="0">
<source src="<Your movie>" />
<p class="amp-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video</p>
</video>
希望能夠幫助:)
要關閉標誌與JS,你可以使用下面的示例設置東西的時候。
<script>
var myPlayer = null;
if (!!myPlayer) {
myPlayer.dispose();
}
var myOptions = {
"nativeControlsForTouch": false,
"logo": { "enabled": false },
autoplay: true,
controls: true,
width: "640",
height: "400",
poster: ""
};
myPlayer = amp("vid1", myOptions);
myPlayer.currentTime(30);
myPlayer.src([{ src: "http://amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest", type: "application/vnd.ms-sstr+xml" }, ]);
</script>
使用下面的腳本
<link href="//amp.azure.net/libs/amp/latest/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="//amp.azure.net/libs/amp/latest/azuremediaplayer.min.js"></script>
<script>
amp.options.flashSS.swf = "//amp.azure.net/libs/amp/latest/techs/StrobeMediaPlayback.2.0.swf"
amp.options.flashSS.plugin = "//amp.azure.net/libs/amp/latest/techs/MSAdaptiveStreamingPlugin-osmf2.0.swf"
amp.options.silverlightSS.xap = "//amp.azure.net/libs/amp/latest/techs/SmoothStreamingPlayer.xap"
</script>
和HTML標記看起來像這樣。
<video id="vid1" class="azuremediaplayer amp-default-skin amp-big-play-centered" tabindex="0"> </video>
偉大的答案,謝謝你們倆! –
使用"logo": { "enabled": false }
使用Azure的媒體播放器v2.0,
所以,這個CSS技巧將做的伎倆時,將無法正常工作。
.amp-content-title {
display: none;
}
- 更新 -
或作爲this comment提到,剛剛升級到這個問題是固定的版本2.1.2(和"logo": { "enabled": false }
應罰款再次合作)
這個技巧非常有用。 –
這裏的關鍵是''''logo「:{」enabled「:false}''' – tylerlindell