瀏覽代碼

iframe dans embed-responsive

François 6 年之前
父節點
當前提交
f90d4f2443
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/AppBundle/Entity/MediaVideo.php
  2. 1 1
      src/AppBundle/Resources/views/videotheque/voirfilm.html.twig

+ 1 - 1
src/AppBundle/Entity/MediaVideo.php

@@ -239,7 +239,7 @@ class MediaVideo
 
 
     public function video()
     public function video()
     {
     {
-        $video = "<iframe width='100%' height='100%' src='".$this->embedUrl()."'  frameborder='0'  allowfullscreen></iframe>";
+        $video = "<iframe src='".$this->embedUrl()."'  allowfullscreen></iframe>";
         return $video;
         return $video;
     }
     }
 
 

+ 1 - 1
src/AppBundle/Resources/views/videotheque/voirfilm.html.twig

@@ -80,7 +80,7 @@
                         </div>
                         </div>
                         <div class="card-body">
                         <div class="card-body">
                             {% if film.mediaVideo.video is defined %}
                             {% if film.mediaVideo.video is defined %}
-                                <div style="height :200px ;width :300px;">
+                                <div class="embed-responsive embed-responsive-4by3">
                                     {{ film.mediaVideo.video|raw }}
                                     {{ film.mediaVideo.video|raw }}
                                 </div>
                                 </div>
                             {% else %}
                             {% else %}