2015-04-21 27 views

回答

23

我今天也遇到了這個問題。這裏是解決

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

希望能夠幫助:)

+1

這裏的關鍵是''''logo「:{」enabled「:false}''' – tylerlindell

8

要關閉標誌與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> 
+0

偉大的答案,謝謝你們倆! –

4

使用"logo": { "enabled": false }使用Azure的媒體播放器v2.0

所以,這個CSS技巧將做的伎倆時,將無法正常工作。

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

- 更新 -

或作爲this comment提到,剛剛升級到這個問題是固定的版本2.1.2(和"logo": { "enabled": false }應罰款再次合作)

+1

這個技巧非常有用。 –