2017-10-18 10 views
0

Je dois mettre la vidéo sur le site Web. J'ai mis des liens visuels de youtube sur mon site Web. J'utilise iframe. Et ne vois pas de vidéo. Je vois seulement l'écran avec les noms des vidéos, mais pas une vidéo. J'utilise les liens que donne YouTube. Qu'est-ce qui peut être un problème? Dois-je utiliser quelque chose de plus dans mon code? Je dois ajouter quelque chose dans Meta pour utiliser iframe?La vidéo de youtube dans iframe ne fonctionne pas

.central-container{ 
 
    margin-left: 18.75%; 
 
    margin-right: 18.75%; 
 
    height: 100%; 
 
} 
 
.container-for-all-videos{ 
 
    width: 100%;  
 
    height: 100%; 
 
    margin-top: 30px; 
 
} 
 
.container-for-video{ 
 
    margin: 10px; 
 
    width: 46%; 
 
    min-width: 250px; 
 
} 
 
.container-for-video h4{ 
 
    margin-top: 10px; 
 
    text-align: center; 
 
} 
 
@media (min-width: 978px){ 
 
    .container-for-video:nth-child(odd){ 
 
     float: left;  
 
    } 
 
    .container-for-video:nth-child(even){ 
 
     float: right;  
 
    } 
 
    
 
} 
 
@media (min-width: 440px){ 
 
    .bottom-info-container{ 
 
     
 
     margin: 50px auto 150px auto;   
 
    } 
 
} 
 
@media (max-width: 978px){ 
 
    
 
    .container-for-video{ 
 
     margin-left: auto; 
 
     margin-right: auto; 
 

 
    } 
 
}
<div class="central-container"> 
 
      <div class="container-for-all-videos"> 
 
       <div class="container-for-video"> 
 
        <iframe src="https://www.youtube.com/watch?v=_N1z37KqpCc" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
        </iframe> 
 
        <h4>ד"ר אלדר על ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe src="https://www.youtube.com/watch?v=rAwB17JTIgs" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
         </iframe> 
 
         <h4>ד"ר אלדר מתארח אצל אלונה פרידמן על ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe src="https://www.youtube.com/watch?v=PMHpU-f3Kzo" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
         </iframe> 
 
         <h4>ניתוח שרוול קיבה ע"י ד"ר אלדר</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe src="https://www.youtube.com/watch?v=0ij0poiNEvw" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
         </iframe> 
 
         <h4>ראיון נוסף של ד"ר אלדר אצל אלונה פרידמן</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe src="https://www.youtube.com/watch?v=rfF-1tyG_uI&t=21s" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
         </iframe> 
 
         <h4>ד"ר אלדר על תוצאות ארוכות טווח של ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe src="https://www.youtube.com/watch?v=_N1z37KqpCc" width="100%" height="auto" frameborder="0" allowfullscreen> 
 
         </iframe> 
 
         <h4>ד"ר אלדר על ניתוחים בריאטריים</h4> 
 
       </div> 
 

 
      </div>

+1

Comment appelez-vous votre site web? Avec 'http: //' ou 'https: //'? – reporter

+0

Je ne l'ai toujours pas mis sur un serveur. Donc, il n'a pas http: // ou https: //. Mais pour la vidéo, j'ai essayé les deux. – Natalia

Répondre

2

Vous devez aller à youtube.com et cliquez sur Partager puis incorporer et copier la source iframe sans le faire, cela ne fonctionnera pas comme youtube comme bloc iframe

.central-container{ 
 
    margin-left: 18.75%; 
 
    margin-right: 18.75%; 
 
    height: 100%; 
 
} 
 
.container-for-all-videos{ 
 
    width: 100%;  
 
    height: 100%; 
 
    margin-top: 30px; 
 
} 
 
.container-for-video{ 
 
    margin: 10px; 
 
    width: 46%; 
 
    min-width: 250px; 
 
} 
 
.container-for-video h4{ 
 
    margin-top: 10px; 
 
    text-align: center; 
 
} 
 
@media (min-width: 978px){ 
 
    .container-for-video:nth-child(odd){ 
 
     float: left;  
 
    } 
 
    .container-for-video:nth-child(even){ 
 
     float: right;  
 
    } 
 
    
 
} 
 
@media (min-width: 440px){ 
 
    .bottom-info-container{ 
 
     
 
     margin: 50px auto 150px auto;   
 
    } 
 
} 
 
@media (max-width: 978px){ 
 
    
 
    .container-for-video{ 
 
     margin-left: auto; 
 
     margin-right: auto; 
 

 
    } 
 
}
<div class="central-container"> 
 
      <div class="container-for-all-videos"> 
 
       <div class="container-for-video"> 
 
        <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
        <h4>ד"ר אלדר על ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
         
 
         <h4>ד"ר אלדר מתארח אצל אלונה פרידמן על ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
         <h4>ניתוח שרוול קיבה ע"י ד"ר אלדר</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
         <h4>ראיון נוסף של ד"ר אלדר אצל אלונה פרידמן</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
         <h4>ד"ר אלדר על תוצאות ארוכות טווח של ניתוחים בריאטריים</h4> 
 
       </div> 
 
       <div class="container-for-video"> 
 
         <iframe width="560" height="315" src="https://www.youtube.com/embed/rAwB17JTIgs" frameborder="0" allowfullscreen></iframe> 
 
         <h4>ד"ר אלדר על ניתוחים בריאטריים</h4> 
 
       </div> 
 

 
      </div>