aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2013-11-07 03:19:39 +0100
committerSem <sembrestels@riseup.net>2013-11-07 03:19:39 +0100
commit24e097f126aee59206c7f44e2b37b915d85dfd23 (patch)
tree3bdcc75975898262d364454ef15b36a62cfb0840
parent5a051b09c63a5d2b58e4cd7d93cdf747181a60b1 (diff)
downloadelgg-24e097f126aee59206c7f44e2b37b915d85dfd23.tar.gz
elgg-24e097f126aee59206c7f44e2b37b915d85dfd23.tar.bz2
Setting responsive dimensions.
-rw-r--r--start.php5
-rw-r--r--views/default/object/videolist_item.php7
-rw-r--r--views/default/videolist/css.php17
-rw-r--r--views/default/videolist/watch/bliptv.php4
-rw-r--r--views/default/videolist/watch/gisstv.php4
-rw-r--r--views/default/videolist/watch/metacafe.php4
-rw-r--r--views/default/videolist/watch/vimeo.php4
-rw-r--r--views/default/videolist/watch/youtube.php4
8 files changed, 21 insertions, 28 deletions
diff --git a/start.php b/start.php
index 431015b24..877992b1a 100644
--- 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);
diff --git a/views/default/object/videolist_item.php b/views/default/object/videolist_item.php
index 474394288..5789c8475 100644
--- a/views/default/object/videolist_item.php
+++ b/views/default/object/videolist_item.php
@@ -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(
diff --git a/views/default/videolist/css.php b/views/default/videolist/css.php
index 931d80567..625935451 100644
--- a/views/default/videolist/css.php
+++ b/views/default/videolist/css.php
@@ -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
diff --git a/views/default/videolist/watch/bliptv.php b/views/default/videolist/watch/bliptv.php
index b7f72dea6..241cf791b 100644
--- a/views/default/videolist/watch/bliptv.php
+++ b/views/default/videolist/watch/bliptv.php
@@ -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>";
diff --git a/views/default/videolist/watch/gisstv.php b/views/default/videolist/watch/gisstv.php
index 15a903ab1..a96894ada 100644
--- a/views/default/videolist/watch/gisstv.php
+++ b/views/default/videolist/watch/gisstv.php
@@ -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>";
diff --git a/views/default/videolist/watch/metacafe.php b/views/default/videolist/watch/metacafe.php
index ddf2b155e..40b632cf6 100644
--- a/views/default/videolist/watch/metacafe.php
+++ b/views/default/videolist/watch/metacafe.php
@@ -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>";
diff --git a/views/default/videolist/watch/vimeo.php b/views/default/videolist/watch/vimeo.php
index 97b5e8d88..d3ffd4391 100644
--- a/views/default/videolist/watch/vimeo.php
+++ b/views/default/videolist/watch/vimeo.php
@@ -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>";
diff --git a/views/default/videolist/watch/youtube.php b/views/default/videolist/watch/youtube.php
index e0b2ece06..b0b758718 100644
--- a/views/default/videolist/watch/youtube.php
+++ b/views/default/videolist/watch/youtube.php
@@ -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>";