aboutsummaryrefslogtreecommitdiff
path: root/mod/livestream/views/default/view.php
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:56:18 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-03-15 14:56:18 -0300
commita7be81c3f81c807d43ed32965ee7ac11ebe71895 (patch)
tree71751c05eb80ae6e348790f3e46652c9dfe0be7d /mod/livestream/views/default/view.php
parentf3beeb45f9f192aee6ede0c9b6f0fa8b8d82a9ef (diff)
parent059badecbc0be895c6165430e5096a9ab653027e (diff)
downloadelgg-a7be81c3f81c807d43ed32965ee7ac11ebe71895.tar.gz
elgg-a7be81c3f81c807d43ed32965ee7ac11ebe71895.tar.bz2
Merge commit '059badecbc0be895c6165430e5096a9ab653027e' as 'mod/livestream'
Diffstat (limited to 'mod/livestream/views/default/view.php')
-rwxr-xr-xmod/livestream/views/default/view.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/mod/livestream/views/default/view.php b/mod/livestream/views/default/view.php
new file mode 100755
index 000000000..4c13dfbab
--- /dev/null
+++ b/mod/livestream/views/default/view.php
@@ -0,0 +1,50 @@
+<?php
+ /**
+ * Elgg livestream plugin
+ *
+ * @package LiveStream
+ */
+$streamid = $vars['streamid'];
+$item = livestream_get($streamid);
+
+if($item){
+ $src = $item->src;
+ /* the following html code raises this funny notice
+ *
+ * NOTICE: SELECT e.* from elgg_users_entity u join elgg_entities e on e.guid=u.guid where
+ *
+ * u.username='com.fluendo.player.Cortado.class'
+ *
+ * and ( (e.access_id = -2\n\t\t\tAND e.owner_guid
+ * IN (\n\t\t\t\tSELECT guid_one FROM
+ * elgg_entity_relationships\n\t\t\t\tWHERE relationship='friend' AND guid_two=6\n\t\t\t))
+ * OR (e.access_id IN (2,1,4,5,6)\n\t\t\tOR (e.owner_guid = 6)\n\t\t\tOR
+ * (\n\t\t\t\te.access_id = 0\n\t\t\t\tAND e.owner_guid = 6\n\t\t\t)\n\t\t)
+ * and e.enabled='yes') results cached, referer:
+ * http://localhost/lorea/elgg/livestream/alice
+ *
+ * */
+
+ $autoplay = ($item->autoplay) ? "autoplay" : "";
+
+ $row = "
+ <div>
+ $item->title<br />
+ <video $autoplay src='$src' controls width=320 height=240>
+ <applet code='com.fluendo.player.Cortado.class' archive='cortado.jar' height='240' width='320'>
+ <param name='url' value='".$item->src."'>
+ <param name='local' value='false'>
+ <param name='keepaspect' value='true'>
+ <param name='".$item->mediatype."' value='true'>
+ <param name='bufferSize' value='60'>
+ </applet>
+ </video>
+ <br />
+ </div>
+ ";
+
+ echo elgg_echo($row);
+}
+
+
+?>