【问题标题】:Turn off Azure Media Services logo in media player在媒体播放器中关闭 Azure 媒体服务徽标
【发布时间】:2018-02-15 22:59:27
【问题描述】:

我正在阅读新 Azure 媒体播放器 (https://aka.ms/ampdocs) 的文档,但我仍然不知道如何关闭 AMS 徽标。我应该设置

amp.Player.LogoConfig.enabled = false

?这对我不起作用。我是否在<video> 标签上设置了一些东西?我找不到向我展示如何操作的示例。

【问题讨论】:

    标签: azure-media-services


    【解决方案1】:

    我今天也遇到了这个问题。这是解决方案

    <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>

    希望有所帮助:)

    【讨论】:

    • 这里的关键是"logo": { "enabled": false }
    【解决方案2】:

    要在使用 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>
    

    【讨论】:

      【解决方案3】:

      在使用 Azure 媒体播放器 v2.0 时,使用 "logo": { "enabled": false } 将不起作用,

      所以,这个 CSS hack 可以解决问题。

      .amp-content-title {
          display: none;
      }
      

      -- 更新--

      或者如this comment 中所述,只需升级到修复此问题的版本 2.1.2("logo": { "enabled": false } 应该会再次正常工作)

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多