2015-04-21 8 views

risposta

23

Ho affrontato anche questo problema oggi. E qui è la soluzione

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

Speranza che aiuta :)

+1

la chiave qui è '' '" logo ": {" enabled ": false}' '' – tylerlindell

8

Per spegnere il logo quando si imposta le cose con js è possibile utilizzare il seguente esempio.

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

Utilizzando i seguenti 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> 

e tag HTML simile a questo.

 <video id="vid1" class="azuremediaplayer amp-default-skin amp-big-play-centered" tabindex="0"> </video> 
+0

Grandi risposte, grazie a tutti e due! –

4

Utilizzando "logo": { "enabled": false } non funziona quando si utilizza Azure Media Player v2.0,

Quindi, questo hack CSS farà il trucco.

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

- Aggiornamento -

O come indicato nella this comment, solo l'aggiornamento alla versione 2.1.2 in cui questo problema è stato risolto (e la "logo": { "enabled": false } dovrebbe funzionare bene ancora una volta)

+1

Questo trucco è davvero utile. –

Problemi correlati