是否有使用 Azure 媒体播放器的标准?

Is there a standard for using the Azure Media Player?

我一直在研究 Azure 媒体服务,我已经能够创建一个程序,将我的视频 blob 从我的网站存储复制到我的媒体服务存储帐户,并从中创建一个 asset/asset 文件.然后我得到了自适应流媒体编码。

我遇到的问题是播放。我想使用 Azure Media Player,因为它在检测环境和提供正确编码的流媒体视频方面显示出巨大的潜力。

当我使用 iframe 方法 (found here) 时它可以工作,但我觉得我失去了一些自定义能力 -- 而且它在 Mac.[=18= 上的 Safari 中中断了]

<iframe class="video-preview" src="//aka.ms/azuremediaplayeriframe?url=[MANIFEST URL HERE]&autoplay=false" name="azuremediaplayer" allowfullscreen></iframe>

另一种方法 (found here) 使用 <video> 标签以及 css 和放在 header.

中的 js 文件

Header代码:

<link href="//amp.azure.net/libs/amp/1.1.0/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
    <script src="//amp.azure.net/libs/amp/1.1.0/azuremediaplayer.min.js"></script>
    <script>
        amp.options.flashSS.swf = "//amp.azure.net/libs/amp/1.1.0/techs/StrobeMediaPlayback.2.0.swf"
        amp.options.flashSS.plugin = "//amp.azure.net/libs/amp/1.1.0/techs/MSAdaptiveStreamingPlugin-osmf2.0.swf"
        amp.options.silverlightSS.xap = "//amp.azure.net/libs/amp/1.1.0/techs/SmoothStreamingPlayer.xap"
    </script>

视频代码:

<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered video-preview" controls data-setup='{"nativeControlsForTouch": false}'>
        <source src="[MANIFEST URL HERE]" type="application/vnd.ms-sstr+xml" />
        <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>

<data-setup> 属性应该激活 <video> 标签并将其变成 Azure 媒体播放器,但我没有这样做。

所以,我的问题是:preferred/standard是什么方法?我知道这很难确定,因为它还很年轻,而且一直在变化,但我只是想看看其他人的经历。

demo website 上的 iframe 方法目前是概念验证(请参阅页面 "Note: this embed code is for demo purposes only. Do not use in production" 上的警告)。它旨在作为一种方式来表明播放器可以在 iframe 中工作。这会随着时间的推移而扩展,但目前 iframe 的灵活性仅限于您希望如何设计参数。

一般来说,您采用的方法取决于您要实现的目标(即取决于您需要的灵活性级别)。一般来说,目前推荐的做法是直接在你的页面上使用JS和CSS方法

现在,对于您遇到的问题,如果能够了解您所看到的内容,那将是非常好的。

1.For Mac 上 Safari 上的 iframe 问题,您看到了什么?我刚刚在 OS X Yosemite 和 Safari 上尝试了以下操作,它似乎工作正常

<iframe src="//aka.ms/azuremediaplayeriframe?url=%2F%2Famssamples.streaming.mediaservices.windows.net%2F91492735-c523-432b-ba01-faba6c2206a2%2FAzureMediaServicesPromo.ism%2Fmanifest&autoplay=false" name="azuremediaplayer" scrolling="no" frameborder="no" align="center" height="280px" width="500px" allowfullscreen></iframe>

2。您可以查看 documentation? Here is the list of samples and specifically you should look at the basic videotag sample 中提供的示例吗?您需要确保将源添加到视频标签,以便自动检测工作。如果你还在

如果您仍有问题,请联系 ampinfo@microsoft.com