【问题标题】:Poster image is not working in videos, with version 1.5.0 update of azure media player海报图像不适用于视频,Azure 媒体播放器 1.5.0 版更新
【发布时间】:2015-11-16 15:47:52
【问题描述】:

我遇到了一个奇怪的问题,将我的 azure 媒体播放器升级到 1.5.0 版后,它没有占用海报图像,在 1.3.0 版中它工作得非常好。

这是我正在使用的代码。

<div class="marginBlock" id="mediaPlayer">
<h3>
    <asp:Label ID="lblTitle" runat="server"><%=Title.ToString()%></asp:Label>
</h3>
<video id="<%=mediaPlayerID %>" class="azuremediaplayer amp-default-skin amp-big-play-centered">
</video>
<p>
    <asp:Label ID="lblDescription" runat="server"><%=Description.ToString()%></asp:Label>
</p>

<script>
     $(document).ready(function () {
    var playOptions = {
        "nativeControlsForTouch": false,
        autoplay: false,
        controls: true,
        heuristicProfile: "High Quality",
        techOrder: ["azureHtml5JS", "html5", "flashSS", "silverlightSS"],
        logo: { enabled: false },
        poster: "<%=ImageSelector%>",
        width: '100%'
    };

    var azurePlayer = amp('<%=mediaPlayerID%>', playOptions);

    azurePlayer.src([{
        src: "<%=VideoURL%>",
        type: 'application/vnd.ms-sstr+xml'
    }]);
</script>

其中 mediaplayerID、VideoURL、Title、Description 和 ImageSelector 是来自后端的动态值,此代码与 azure 1.3.0 版完美配合。

【问题讨论】:

  • 张贴者是相对 URL 还是绝对 URL?

标签: javascript asp.net azure azure-media-services


【解决方案1】:

Azure Media Player 1.5.0 具有一些安全增强功能,其中之一是要求海报是绝对 URL。切换到使用绝对 URL,它应该可以正常工作。我们将更新文档以反映这一变化。

【讨论】:

  • 谢谢,我会处理它,我们正在使用 CMS,所以我们需要处理它以添加使用绝对 URL 的逻辑。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-11-20
  • 2023-03-09
  • 2020-05-02
  • 2014-09-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多