【发布时间】: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