Ciao a tutti,
Allora... Vi spiego cosa devo fare:
Se una persona entra nel sito "X" (tramite reff), vorrei che gli si aprisse il video di youtube e magari sapere come rendere il più piccolo possibile inoltre volevo sapere anche come far a "mutare il video"... cioè che quando gli appare il video il suono non si sente. DEVE VISUALIZZARE LA VIEWS.
Grazie in anticipo.
Mi hanno suggerito questo codice, ma non conta la views:
oppure qui Link<div id="player" style="display: none;"></div>
<script type="text/javascript">
var tag = document.createElement('script');
tag.src = "http://www.youtube.com/player_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubePlayerAPIReady() {
player = new YT.Player('player', {
playerVars: { 'autoplay': 1 },
videoId: 'ID_VIDEO',
events: {
'onReady': onPlayerReady
}
});
}
function onPlayerReady(event) {
event.target.mute();
}
</script>
P.S.: Dove c'è scritto "ID_VIDEO" ho messo l'id del mio video.
Ho creato questo BLOG per testare... (ma appunto non conta le views)