PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 25 → WX - Como colocar um video do Youtube em uma página Webdev
WX - Como colocar um video do Youtube em uma página Webdev
Iniciado por Boller, mar., 20 2021 7:08 PM - Sem resposta
Membro registado
3.657 mensagems
Popularité : +175 (223 votes)
Publicado em março, 20 2021 - 7:08 PM
Prezados,

Abaixo explico como fazer:

1 - Crie uma nova página

2 - Coloque o controle RTF de texto nessa pagina





3 - Click com o botao direito do mouse sobre o controle RTF e click em Description:





RICH Text Area Control

Em "EDIT HTML CODE"






Cole esse código abaixo e troque o ID do video no Youtube

videoId: 'qETxZ8UZ7jo', <----------------- Coloque aqui o seu ID do seu video

<div id="ytplayer"></div>
<script>
var player;
var onYouTubePlayerAPIReady;
FUNCTION initYoutube(){
// Load the IFrame Player API code asynchronously.
var tag = Document.createElement('script');
tag.src = "https://www.youtube.com/player_api";
var firstScriptTag = Document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
onYouTubePlayerAPIReady = FUNCTION() {
player = new YT.Player('ytplayer', {
height: '100%',
width: '100%',
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// ENTREZ ICI L'ID DE VOTRE VIDEO YOUTUBE
videoId: 'qETxZ8UZ7jo',
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
playerVars: {
controls:2,
showinfo:0,
modestbranding:1,
enablejsapi:1,
html5:1,
frameborder:0
}
});
}
}
var _bIEAvec11 = ((-1 == navigator.userAgent.toLowerCase().indexOf("opera"))
&& (-1 != navigator.appName.indexOf("Microsoft")))
|| (-1 != navigator.userAgent.indexOf("Trident/"));
IF (_bIEAvec11){
initYoutube();
}
ELSE{
Document.body.attributes.onLoad.value += "initYoutube()";
}
</script>


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/