关闭媒体播放器中的 Azure 媒体服务徽标
Turn off Azure Media Services logo in media player
我正在阅读新的 Azure 媒体播放器 (https://aka.ms/ampdocs) 的文档,但我仍然不知道如何关闭 AMS 徽标。我应该设置
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>
在使用 Azure Media Player v2.0、
时,无法使用 "logo": { "enabled": false }
所以,这个 CSS 技巧可以解决问题。
.amp-content-title {
display: none;
}
--更新--
或者如 this comment 中所述,只需升级到解决此问题的版本 2.1.2(并且 "logo": { "enabled": false }
应该可以再次正常工作)
我正在阅读新的 Azure 媒体播放器 (https://aka.ms/ampdocs) 的文档,但我仍然不知道如何关闭 AMS 徽标。我应该设置
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>
在使用 Azure Media Player v2.0、
时,无法使用"logo": { "enabled": false }
所以,这个 CSS 技巧可以解决问题。
.amp-content-title {
display: none;
}
--更新--
或者如 this comment 中所述,只需升级到解决此问题的版本 2.1.2(并且 "logo": { "enabled": false }
应该可以再次正常工作)