]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Setting responsive dimensions.
authorSem <sembrestels@riseup.net>
Thu, 7 Nov 2013 02:19:39 +0000 (03:19 +0100)
committerSem <sembrestels@riseup.net>
Thu, 7 Nov 2013 02:19:39 +0000 (03:19 +0100)
start.php
views/default/object/videolist_item.php
views/default/videolist/css.php
views/default/videolist/watch/bliptv.php
views/default/videolist/watch/gisstv.php
views/default/videolist/watch/metacafe.php
views/default/videolist/watch/vimeo.php
views/default/videolist/watch/youtube.php

index 431015b2420c18c571aa97aa2f68281371b8e21a..877992b1a0c5ee8f44e705ddf3f1c6fbd4fb1612 100644 (file)
--- a/start.php
+++ b/start.php
@@ -34,11 +34,6 @@ function videolist_init() {
                'tags' => 'tags',
                'access_id' => 'access',
        ));
-       
-       elgg_set_config('videolist_dimensions', array(
-               'width'  => 600,
-               'height' => 400,
-       ));
 
        // add to groups
        add_group_tool_option('videolist', elgg_echo('groups:enablevideolist'), true);
index 47439428834b54fde3c5fa3101450ab7e9d0021f..5789c84759bdb196935330c90a7111804cdecfe6 100644 (file)
@@ -61,12 +61,7 @@ if (elgg_in_context('widgets')) {
 
 if ($full && !elgg_in_context('gallery')) {
 
-    $dimensions = elgg_get_config('videolist_dimensions');
-       $content = elgg_view("videolist/watch", array(
-               'entity' => $entity,
-               'width' => (int) $dimensions['width'],
-               'height' => (int) $dimensions['height'],
-       ));
+       $content = elgg_view("videolist/watch", $vars);
        $content = "<div class=\"videolist-watch\">$content</div>";
 
        $params = array(
index 931d80567a12e2e4e6d9cc275eb2e9e0bc23dde0..625935451310435a30b1ed29c1f9013023b0e5a0 100644 (file)
@@ -5,6 +5,19 @@
 ?>
 
 .videolist-watch {
-       margin-top: 40px;
-       margin-left: 20px;
+    margin-top: 40px;
+    position: relative;
+    padding-bottom: 56.25%;
+    padding-top: 30px;
+    height: 0;
 }
+.videolist-watch iframe,
+.videolist-watch object,
+.videolist-watch embed {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+}
\ No newline at end of file
index b7f72dea68704c23fc61b446dcc5983540d243fc..241cf791be9e6a82265f0cb84ccfb1ca9851fe5f 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
 $embedurl = $vars['entity']->embedurl;
-$width = $vars['width'];
-$height = $vars['height'];
 
-echo "<iframe src=\"$embedurl\" width=\"$width\" height=\"$height\" frameborder=\"0\" allowfullscreen></iframe>";
+echo "<iframe src=\"$embedurl\" frameborder=\"0\" allowfullscreen></iframe>";
index 15a903ab15fd4cda82579c1576a1a73bedce2728..a96894adaa59bb5b40a9b0dcbdcdd979266b0fab 100644 (file)
@@ -1,9 +1,7 @@
 <?php
 
 $video_id = $vars['entity']->video_id;
-$width = $vars['width'];
-$height = $vars['height'];
 
-echo "<video width=\"$width\" height=\"$height\" controls=\"\" tabindex=\"0\">
+echo "<video controls=\"\" tabindex=\"0\">
        <source type=\"video/ogg\" src=\"http://giss.tv/dmmdb//contents/$video_id\"></source>
 </video>";
index ddf2b155ed94a9e21ef85099528c8c60e5fb62ee..40b632cf62b8cba9f3182d597b8567575b9e628f 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
 $embedurl = $vars['entity']->embedurl;
-$width = $vars['width'];
-$height = $vars['height'];
 
-echo "<embed flashVars=\"playerVars=autoPlay=no\" src=\"$embedurl\" width=\"540\" height=\"304\" wmode=\"transparent\" allowFullScreen=\"true\" allowScriptAccess=\"always\" name=\"Metacafe_$video_id\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>";
+echo "<embed flashVars=\"playerVars=autoPlay=no\" src=\"$embedurl\" wmode=\"transparent\" allowFullScreen=\"true\" allowScriptAccess=\"always\" name=\"Metacafe_$video_id\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"></embed>";
index 97b5e8d887fe0f9e6bf51d182909ece920a7cb6d..d3ffd439169073ff5bc009c91b86f7b74ee420d7 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
 $video_id = $vars['entity']->video_id;
-$width = $vars['width'];
-$height = $vars['height'];
 
-echo "<iframe src=\"http://player.vimeo.com/video/$video_id?byline=0\" width=\"$width\" height=\"$height\" frameborder=\"0\" webkitAllowFullScreen allowFullScreen></iframe>";
+echo "<iframe src=\"http://player.vimeo.com/video/$video_id?byline=0\" frameborder=\"0\" webkitAllowFullScreen allowFullScreen></iframe>";
index e0b2ece066d65fc9a2f69a07fc028ef136b5d5e5..b0b758718dc5a77d5de6356923ab9b75d3520a85 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
 $video_id = $vars['entity']->video_id;
-$width = $vars['width'];
-$height = $vars['height'];
 
-echo "<iframe width=\"$width\" height=\"$height\" src=\"https://www.youtube-nocookie.com/embed/$video_id\" frameborder=\"0\" allowfullscreen></iframe>";
+echo "<iframe src=\"https://www.youtube-nocookie.com/embed/$video_id\" frameborder=\"0\" allowfullscreen></iframe>";